[New-bugs-announce] [issue14639] Different behavior for urllib2 in Python 2.7

Diego Manenti Martins report at bugs.python.org
Sat Apr 21 01:13:47 CEST 2012

New submission from Diego Manenti Martins <dmmartins at gmail.com>:

this code sends data in a different way if using python 2.6 or python 2.7

>>> import urllib2
>>> url = 'http://server.com/post_image?tid=zoV6LJ'
>>> f = open('test.jpg')
>>> data = f.read()
>>> res = urllib2.urlopen(url, data)

I checked it with wireshark and the data is sent in a different way when using python 2.7

The code works for python2.5 and python2.6

components: Library (Lib)
messages: 158897
nosy: Diego.Manenti.Martins
priority: normal
severity: normal
status: open
title: Different behavior for urllib2 in Python 2.7
type: behavior
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list