On 4/20/2012 6:47 PM, Diego Manenti Martins wrote:

Anybody knows the data is sent in a different way for Python 2.5, 2.6
and 2.7 using this code:

You could check the What's New for 2.7 and see if there is any mention of a change to urllib2. Or diff the 2.6 and 2.7 versions of urllib2.py.

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.

Not when bugs are fixed and improvements made ;-)

--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to