Message66263
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 |
|
| Date |
User |
Action |
Args |
| 2008-05-05 09:45:12 | BitTorment | set | spambayes_score: 0.1875 -> 0.1875 recipients:
+ BitTorment, zathras |
| 2008-05-05 09:45:11 | BitTorment | set | spambayes_score: 0.1875 -> 0.1875 messageid: <1209980709.72.0.185479087894.issue2756@psf.upfronthosting.co.za> |
| 2008-05-05 09:45:08 | BitTorment | link | issue2756 messages |
| 2008-05-05 09:45:07 | BitTorment | create | |
|