Suggestion: "Completing" HTTP support in Python.
Jake Speed
speed at ?.com
Fri Jun 16 17:00:05 EDT 2000
shecter at darmstadt.gmd.de (Robb Shecter) wrote in
<394A27FE.3CA5D365 at darmstadt.gmd.de>:
>>Surely this level is higher than HTTP.
>
>I disagree. I think that an HTTP request can be seen as a black box
>with these "knobs", or inputs:
>
>Destination URL (host, port, path)
>A set of parameters
>A set of headers
>A method (GET, POST ... I'm not interested in the others)
>
>...and then, this black box should have a big "send" button on it,
>which results in the usual python 3-tuple popping out. All of these
>items are specified in the RFC.
Technically the 'set of parameters' isn't -- RFC's 2396 and 2616 don't
make any reference to the format of the URL query segment, and 2616
doesn't make any restriction on the POST content type.
GETting 'path?name1=value1&name2=value2' is a convention of web
browsers that submit HTML forms, as is POSTing this:
Content-Type: application/x-www-form-urlencoded
name1=value1&name2=value2
but it's not inherent to the HTTP spec.
Well, 2616 does refer to 1867 - 'Content-Type: multipart/form-data',
but in that case the 'add_parameter(name, value)' method won't be
sufficient; you might need (name, filename, mimetype, filedata).
-Speed!
More information about the Python-list
mailing list