Tcl Library Source Code

View Ticket
Login
Ticket UUID: 1213545
Title: mime: Provide getheaders and getbody (enhancement)
Type: Bug Version: None
Submitter: cc_benny Created on: 2005-06-02 14:39:31
Subsystem: mime Assigned To: pooryorick
Priority: 5 Medium Severity: Minor
Status: Pending Last Modified: 2018-12-05 07:30:39
Resolution: None Closed By: patthoyts
    Closed on: 2006-11-06 22:16:20
Description:
I've been trying to use the mime package for HTTP form 
data (see <http://wiki.tcl.tk/FileUploadWithTclSHttp>).  
  
The http package wants additional HTTP headers as a list, 
and the content-type separately. 
 
The mime package doesn't have a getheaders method returning 
a list of headers and getbody doesn't work for multipart. 
I think buildmessage should be split into those two functions. 
It's easy enough to get the content-type from the headers 
ourself once we have them.
User Comments: pooryorick added on 2018-12-05 07:30:39:

As of [a9488befa9bdb1ca], the mime package provides tools to access and serialize headers and body parts independently. With these tools it should be possible to use mime in conjunction with the http package and other packages.


cc_benny added on 2006-11-08 01:39:28:
Logged In: YES 
user_id=143885

> getbody doesn't make sense for a multipart message.

?? Then how do I combine the mime and http packages
to implement HTTP form data?  The http package wants
the body separately.  At least that was the case when
I filed this RFE, I admit that haven't looked at the
issue since.

patthoyts added on 2006-11-07 05:16:20:
Logged In: YES 
user_id=202636

mime::getheader $token  returns a list of header value pairs.
getbody doesn't make sense for a multipart message.