Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Clear off any timestamps/signatures before signing,

as resent requests don't necessarily clear their headers.
  • Loading branch information...
commit c7fb847637eacfdb70d44e0ad52e0a504108d8b7 1 parent 993e5a2
James D. Nurmi authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 signer.go
View
4 signer.go
@@ -74,6 +74,8 @@ func (self *Signer)SignRequestV2(req *http.Request, canon func(*http.Request)(st
req.Form.Set("Version", api_ver)
req.Form.Set("AWSAccessKeyId",self.AccessKey)
req.Form.Del("Signature")
+ req.Form.Del("Timestamp")
+ req.Form.Del("Expires")
if req.Form.Get("Timestamp") == "" && req.Form.Get("Expires") == "" {
if exp > 0 {
req.Form.Set("Expires",strconv.Itoa64(time.Seconds() + exp))
@@ -91,7 +93,7 @@ func (self *Signer)SignRequestV2(req *http.Request, canon func(*http.Request)(st
if err == nil {
req.Form.Set("Signature", string(sig))
- if req.Method == "GET" {
+ if req.Method != "POST" {
if req.URL.RawQuery != "" {
req.URL.RawQuery += "&"
}
Please sign in to comment.
Something went wrong with that request. Please try again.