Ubuntu Pastebin

Paste from katco at Thu, 2 Apr 2015 16:19:21 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
diff --git a/ec2/ec2.go b/ec2/ec2.go
index 01d7723..3911b24 100644
--- a/ec2/ec2.go
+++ b/ec2/ec2.go
@@ -140,8 +140,10 @@ func (ec2 *EC2) query(params map[string]string, resp interface{}) error {
 	for varName, varVal := range params {
 		query.Add(varName, varVal)
 	}
-	query.Add("Timestamp", timeNow().In(time.UTC).Format(time.RFC3339))
+	now := timeNow().In(time.UTC).Format(time.RFC3339)
+	query.Add("Timestamp", now)
 	req.URL.RawQuery = query.Encode()
+	req.Header.Set("date", now)
Download as text