{"issue":{"state":"closed","created_at":"2011-11-01T04:06:49Z","updated_at":"2011-11-25T12:49:46Z","user":{"gravatar_id":"e236829c38fb78c4d7f7ff1dd826197e","id":585279,"url":"https://api.github.com/users/mitar","login":"mitar","avatar_url":"https://secure.gravatar.com/avatar/e236829c38fb78c4d7f7ff1dd826197e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":2,"body":"HTTP POST requests do not really work. At least Django is not able to parse them properly (even request.raw_post_data is empty). There are few reasons for that but main is that headers have been set explicitly so urllib2 has not populate them itself. For example, content-length is one of such missing.\r\n\r\nAlso some non-documented internals have been used to manipulate headers. Public API provides only ``request.add_header``.\r\n\r\nI have changed code so that Celery headers are added after urllib2 populates its own. ``Content-Type`` is changed to ``application/x-www-form-urlencoded`` which in fact correct as payload is urlencoded and not JSON encoded.\r\n\r\nRequest before my changes looked like this:\r\n\r\n    POST /foo/ HTTP/1.0\r\n    Host: localhost:8080\r\n    Content-Type: application/json\r\n    User-Agent: celery/2.4.0rc1\r\n    Content-type: application/json\r\n    User-agent: celery/2.4.0rc1\r\n\r\nYes, headers were doubled.\r\n\r\nNow they look like this:\r\n\r\n    POST /foo/ HTTP/1.0\r\n    Content-type: application/x-www-form-urlencoded\r\n    Content-length: 411\r\n    Host: localhost:8080\r\n    User-agent: celery/2.4.0rc1\r\n","assignee":null,"id":2104760,"labels":[],"pull_request":{"patch_url":"https://github.com/ask/celery/pull/515.patch","html_url":"https://github.com/ask/celery/pull/515","diff_url":"https://github.com/ask/celery/pull/515.diff"},"number":515,"title":"Fixed HTTP POST requests.","closed_at":"2011-11-25T12:42:50Z","html_url":"https://github.com/ask/celery/issues/515","url":"https://api.github.com/repos/ask/celery/issues/515","milestone":null},"action":"created","comment":{"created_at":"2011-11-25T12:49:46Z","updated_at":"2011-11-25T12:49:46Z","user":{"gravatar_id":"e236829c38fb78c4d7f7ff1dd826197e","id":585279,"url":"https://api.github.com/users/mitar","login":"mitar","avatar_url":"https://secure.gravatar.com/avatar/e236829c38fb78c4d7f7ff1dd826197e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Great. Thanks. Name is OK as it is.","id":2874260,"url":"https://api.github.com/repos/ask/celery/issues/comments/2874260"}}