Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Set Content-Length on POSTs

  • Loading branch information...
commit 6c5ced4e80aa8b9a780e1dbaf7ccc15d7b3808ff 1 parent 09c13c3
@edsrzf edsrzf authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  ironmq.go
View
2  ironmq.go
@@ -39,6 +39,7 @@ func (c *Client) req(method, endpoint string, body []byte) (map[string]interface
}
if body != nil {
req.Header.Set("Content-Type", "application/json")
+ req.ContentLength = int64(len(body))
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
@@ -82,7 +83,6 @@ func (q *Queue) Get() (*Message, os.Error) {
if err != nil {
return nil, err
}
- var body string
body, ok := resp["body"].(string)
if !ok {
return nil, os.NewError("Body is not a string")
Please sign in to comment.
Something went wrong with that request. Please try again.