[mod_python] RE:[mod_python]argumentmatchingforforms

Steven Lott s_lott at yahoo.com
Fri Apr 5 06:30:37 EST 2002


Short version: get puts form arguments into the URL
post puts form arguments into a stream that can be read by
Apache/Modpython.

Generally, GET is a bad idea - form data needs to be encoded to
prevent problems creating a URL - there are limitations on size.

Always use POST - no encoding, no size limitations.

GET is the basic URL -> page loop in HTTP.  It is used for
simple non-form requests.  POST should always be used for form
data.

--- sandor.kopanyi at mailbox.hu wrote:
> [...]
> > the <form tag is a way of telling the browser how to lay out
> a form
> > 
> > the GET method is a way to tell the HTTP server what you are
> after
> > 
> > the POST method is a way to give the HTTP server information
> > 
> > browsers linking forms to POST/GET requests is an end user
> convenience
> > 
> > your code *must* accept that some or all of the fields will 
> > not be included for I may manually type
> > 
> > http://www.ewwef.com/page.html?var1=hello&var2=goodbye
> > 
> > Also how would you discriminate between a page request and a
> 
> > submission if you expected
> > 
> > http://www.ewwef.com/page.html?var1=&var2=
> > 
> > the solution to the poster's problem is a wrapper to his 
> > function that checks the parameters for validity (soemthign 
> > he shoudl be doing anyway!)
> 
> Thanks Matt,
> I'm doing anyway param. checking, I just was curious to
> understand,
> why and what... Important is that now it works. BTW: do you
> know
> some good intro about GET/POST? Of course, one can read the
> RFC
> (and it should do it!), but a tutorial always helps... The
> ones
> I found focus on HTML, not on GET/POST.
> 
> Best regards,
> Sandor
> Thanks Matt,
> 
> --------------------------------------------------
> http://www.mailbox.hu - Mert levelezni kell...
> 
> 
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python


=====
--
S. Lott, CCP :-{)
S_LOTT at YAHOO.COM
http://www.mindspring.com/~slott1
Buccaneer #468: KaDiMa

Macintosh user: drinking upstream from the herd.

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/



More information about the Mod_python mailing list