In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote:
> The normal way is > > s = cgi.parse() > > since the CGI script sees the client network socket (after consumption > of HTTP headers) as its standard input. Doesn't work. (I even tried sys.stdin=r.rfile; s=cgi.parse()) Don't forget, this is not a CGI script, it's a handler for a BaseHTTPServer. > > 2. Despite the fact that I'm passing a 1 for the keep_blank_values > > argument to cgi.parse_qs, it doesn't actually keep blank values. Is > > this a bug, or am I doing something wrong? > > > Sounds like a bug, but then since your parsing looks buggy I'm surprised > you get anything at all. Try using a keyword argument > keep_blank_values=1 just in case the order has changed or something > daft. But fix your parsing first. > > The other thing to note is that since you are putting a dictionary's > string representation out straight into your HTML if there are odd > characters in it this may give you strange output in the browser, so you > should view the page source to ensure that's not the case. Which it > probably isn't ... I know that's not a problem because it does work when I use parse_qs. (I know about escaping HTML and all that, but this is just a little test program.) rg -- http://mail.python.org/mailman/listinfo/python-list