python - Urllib2 POST request results in 409 conflict error -


i calling google's pubsubhubbub publisher @ http://pubsubhubbub.appspot.com via django's view. want fetch youtube uploads feeds using it. sending 'post' request using urllib2.request, , 409 conflict error. have setup callback url, , if try post same request using: python manage shell works fine. using nginx server proxy gunicorn instance @ production server. possibly wrong. in advance.

>>> response.request <preparedrequest [post]> >>> response.request.headers {'content-length': u'303', 'content-type': 'application/x-www-form-urlencoded', 'accept-encoding': 'gzip, deflate, compress', 'accept': '*/*', 'user-agent': 'python-requests/1.2.0 cpython/2.6.6 linux/2.6.18-308.8.2.el5.028stab101.3'} >>> response.request.body 'hub.verify=sync&hub.topic=http%3a%2f%2fgdata.youtube.com%2ffeeds%2fapi%2fusers%2fucvcfopbmjqkq4v6bh6l1uuq%2fuploads%3fv%3d2&hub.lease_seconds=2592000&hub.callback=http%3a%2f%2fhypedsound.cloudshuffle.com%2fhub%2f19%2f&hub.mode=subscribe&hub.verify_token=subscribe7367add7b116969a44e0489ad9da45ca8aea4605' 

request body, headers same both requests generated.

here nginx config file: http://dpaste.org/bowho/

it turns out using transactionmiddleware not commit db when model.save() called, creating issue.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -