[Web-SIG] Random thoughts

Steve Holden sholden at holdenweb.com
Sun Nov 2 19:05:46 EST 2003


> -----Original Message-----
> From: web-sig-bounces+sholden=holdenweb.com at python.org
> [mailto:web-sig-bounces+sholden=holdenweb.com at python.org]On Behalf Of
> Bill Janssen
> Sent: Thursday, October 30, 2003 10:46 PM
> To: Greg Ward
> Cc: web-sig at python.org
> Subject: Re: [Web-SIG] Random thoughts
>
>
> >   * I oppose Simon Willison's practice of using the same variable
> >     in the "GET" and "POST" part of a request, but I will
> defend to the
> >     death his right to do so.  (But not in Quixote, where a narrower
> >     definition of what is Right, Good, and Truthfull prevails.)
>
> I don't get it.  Any particular request only has one method, not two:
> "GET" and "POST".  Are you talking about for some reason
> special-casing these two methods in the Request class?  I think it
> makes more sense to do things generically:
>
>    request.path		(e.g., '/foo/bar')
>    request.method	(e.g., "GET")
>    request.part		(e.g., "#bletch", perhaps without the #)
>    request.headers
>    request.parameters	(either the query parms, or the
> multipart/form-data values)
>
>    request.response() => returns a Response object tied to
> this request
>
>    response.error(code, message)	Sends back an error
>    response.reply(htmltext)		Sends back a message
>    response.open(ContentType="text/html", code=200) => file
> object to write to
> 	fp.write(...)
> 	fp.close()			Sends back the response
>    response.redirect(URL)		Sends back redirect to the URL
>
The question is how to integrate data from a POST request (i.e. from the
standard input of the PORT transaction) and any parameters that may be
included in the for action's URI (e.g. if the form has an action
attribute such as "form.py?extra1=val1&extra2=val2")

regards
--
Steve Holden          +1 703 278 8281        http://www.holdenweb.com/
Improve the Internet           http://vancouver-webpages.com/CacheNow/
Python Web Programming                http://pydish.holdenweb.com/pwp/
Interview with GvR August 14, 2003       http://www.onlamp.com/python/






More information about the Web-SIG mailing list