New submission from Till Maas <opensou...@till.name>: When I try to reuse a urllib2.Request object with different post data, the data itself is updated, but the content length is not. Here is a simple script to reproduce it on Python 2.5 on Fedora 10 and 2.6 on Arch Linux:
#!/usr/bin/python # vim: fileencoding=utf8 # test with: echo | socat - tcp4-listen:1111,fork # Demonstrates bad content length of second request, which should be 2 import urllib2 req = urllib2.Request('http://localhost:1111') req.add_data("1") urllib2.urlopen(req) req.add_data("10") urllib2.urlopen(req) ---------- components: Library (Lib) messages: 96567 nosy: till severity: normal status: open title: urllib2 request does not update content length after new add_data type: behavior versions: Python 2.5, Python 2.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7540> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com