[Tutor] Handling post request
katcipis at inf.ufsc.br
Wed Jan 28 12:20:00 CET 2009
actualy i have found what i wanted on the rfile attribute, i already tried
before to read it but the application just freezes when i try to read() or
readline() on it. But after i make the request, and both client and server
sides freezes, if i kill the client side the server becomes able of reading
Does anyone know why i just cant read the rfile without killing the client
side? it feels like the client side is waiting for something while the
server is unable to read the rfile while the client side is waiting.
On Wed, Jan 28, 2009 at 9:09 AM, Tiago Katcipis <katcipis at inf.ufsc.br>wrote:
> thanks for the help, im really not used on doing web stuff, ill try reading
> the how to.
> On Wed, Jan 28, 2009 at 9:03 AM, Alan Gauld <alan.gauld at btinternet.com>wrote:
>> "Tiago Katcipis" <katcipis at inf.ufsc.br> wrote
>> I am trying to make a small HTTP server on python just to handle some
>>> and GET requests. I never worked with http before and dont know if i am
>>> doing something completely stupid (probably yes).
>> Not stupid so much as overly complicated.
>> The cgi module will do all the hard work for you including transparently
>> handling POST and GET requests
>> Read the web HOWTO document:
>> Then read the CGI module documentation which includes a very quick
>> introduction to CGI programming. If you are intending expanding the web
>> site to anything beyond trivial consider using a Framework such as
>> Django, Turbo Gears or Pylons.
>> Unless you are trying to do something very clever - which given your
>> level of knowledge I'd guess is not the case - then the standard
>> cgi module should do all you need!
>> Alan Gauld
>> Author of the Learn to Program web site
>> Tutor maillist - Tutor at python.org
> "it might be a profitable thing to learn Java, but it has no intellectual
> value whatsoever" Alexander Stepanov
"it might be a profitable thing to learn Java, but it has no intellectual
value whatsoever" Alexander Stepanov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor