Upload text file?

Gustaf Liljegren gustafl at algonet.se
Wed Aug 14 00:14:40 CEST 2002


I'm looking for a general way to have a CGI script fetch the whole body of 
an HTTP POST request and put in a variable. It sounds so simple, but I've 
only found solutions for more complex problems, involving forms and binary 
files. Here's my POST request:

---
POST /cgi-bin/test.py HTTP/1.1
Host: 127.0.0.1
Accept: */*
Connection: close

Hello world!
---

So it's the "Hello world!" I want in a variable...

Gustaf



More information about the Python-list mailing list