Different results for different versions of urllib2
Diego Manenti Martins
dmmartins at gmail.com
Fri Apr 20 18:47:20 EDT 2012
Hi.
Anybody knows the data is sent in a different way for Python 2.5, 2.6
and 2.7 using this code:
>>> import urllib2
>>> url = 'http://server.com/post_image?tid=zoV6LJ'
>>> f = open('test.jpg')
>>> data = f.read()
>>> res = urllib2.urlopen(url, data)
It works the same way for python2.5 and python2.6 but not for python2.7
I checked the sent data with WireShark and it sends the data in a
different way. I'm not an expert I just see it's different :)
It might be a server problem although I think the lib should behave
equals for all versions.
Thoughts?
Thank you all!
--
diego
More information about the Python-list
mailing list