[Python-bugs-list] [ python-Bugs-458447 ] overriding content-type in urllib

noreply@sourceforge.net noreply@sourceforge.net
Tue, 04 Sep 2001 20:45:32 -0700


Bugs item #458447, was opened at 2001-09-04 10:01
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=458447&group_id=5470

Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Rich Salz (rsalz)
Assigned to: Guido van Rossum (gvanrossum)
Summary: overriding content-type in urllib

Initial Comment:
urllib should allow the user to set the content-type. 
This would allow applications to do more than just
"forms posting" -- e.g., use it to make SOAP requests.
The attached patch allows that.



----------------------------------------------------------------------

>Comment By: Skip Montanaro (montanaro)
Date: 2001-09-04 20:45

Message:
Logged In: YES 
user_id=44345

I'm not sure why you'd want to program SOAP (or XMLRPC, for
that matter) directly.  You would (normally) only use those
protocols through special-purpose modules like SOAP.py or
xmlrpclib.py, both of which talk to httplib I believe.  I
don't see that allowing the Content-Type: header to be
overridden at the urllib level is all that necessary.  If
you're going to want to mess with Content-Type: you're
probably going to want to mess with other headers as well.


----------------------------------------------------------------------

Comment By: Rich Salz (rsalz)
Date: 2001-09-04 19:02

Message:
Logged In: YES 
user_id=36737

I created this bug because urllib didn't let you set the content-type header. Guido pointed out that I should be using 
httplib.  I didn't use httplib because I didn't know until I read the source, that httplib had an https object that used 
SSL.  So I guess "document the https object" is what this has mutated into.


----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-09-04 14:03

Message:
Logged In: YES 
user_id=3066

It's not at all clear what sort of documentation update is
needed.  What did you have in mind?

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-04 12:20

Message:
Logged In: YES 
user_id=6380

Please don't Delete requests. Please don't Close them unless
you are a project manager (I consider it a SF bug that the
submitter can decide to close a bug report if they happen to
have admin perms on another project). I've reopened this and
recategorized as Doc and assigned to Fred so he can see if
the httplib docs need to be updated.


----------------------------------------------------------------------

Comment By: Rich Salz (rsalz)
Date: 2001-09-04 12:16

Message:
Logged In: YES 
user_id=36737

Okay,  I'll accept that.  Had HTTP documented that it
included HTTPS I wouldn't have made the initial mistake. :)
Let me know if you want the diff.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-04 11:20

Message:
Logged In: YES 
user_id=6380

There's no uploaded file!  You have to check the checkbox labeled
"Check to Upload & Attach File" when you upload a file.

Please try again.

(This is a SourceForge annoyance that we can do nothing about.
:-( )

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-04 11:20

Message:
Logged In: YES 
user_id=6380

Isn't SOAP an HTTP application? Then you shouldn't be using
urllib, but httplib.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=458447&group_id=5470