Martin McNickle <[EMAIL PROTECTED]> added the comment: I can see that there will be a problem in this case.
However, it may be that the authors found it more intuitive to always set the Content-Type to application/x-www-form-urlencoded when data is set. Their implementation is inconsistent though: #------------------------------------------------------- request = urllib2.Request('http://www.somesite.com/') request.add_data(data) f = urllib2.urlopen(request) # 'Content-Type: application/x-www-form-urlencoded' is sent in the header #------------------------------------------------------- whereas: #------------------------------------------------------- request = urllib2.Request('http://www.somesite.com/') request.add_header('Content-Type', 'application/xml') request.add_data(data) # 'Content-Type: application/xml' is sent in the header #------------------------------------------------------- We need to decide what is the best way to handle this case. Should the normal headers be given preference, or should the unredirected headers be given preference? --- Martin ---------- nosy: +BitTorment __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2756> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com