470,849 Members | 1,240 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

q about cgi.FieldStorage (was: And now to sth. completely

Hi,

sorry for following-up to myself. Some remarks:

1) Please excuse the bogus original message. I wrote it a minute
before I knocked off work and I promise to never do so again :-)

2) What I really wanted to know was: FieldStorage writes what it
reads from the stream that is given to its constructor's fp (or
sys.stdin by default) to a temporary file only _in some cases_. My
question was or rather should have been, if it was possible in any
case to get what FieldStorage has read from its input stream either
as a string or as a file.

3) After staring at FieldStorage's source code for some time now I
seem to be sure that this isn't possible because the input stream
is read to a local variable in some cases, i. e. when the request
is url-encoded.
cheers,

andreas

Jul 18 '05 #1
1 1530
"Ames Andreas (MPA/DF)" <An**********@tenovis.com> wrote:

1) Please excuse the bogus original message. I wrote it a minute
before I knocked off work and I promise to never do so again :-)

2) What I really wanted to know was: FieldStorage writes what it
reads from the stream that is given to its constructor's fp (or
sys.stdin by default) to a temporary file only _in some cases_. My
question was or rather should have been, if it was possible in any
case to get what FieldStorage has read from its input stream either
as a string or as a file.


Not in its raw form. The stream comes from Apache and evaporates as it is
read. If you need to raw data, just forget about cgi.FieldStorage and read
stdin directly. You can always copy it to a temp file or StringIO and feed
it back to the cgi module later.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Fred Murray | last post: by
1 post views Thread by Ames Andreas (MPA/DF) | last post: by
reply views Thread by Neil Benn | last post: by
4 posts views Thread by Derek Basch | last post: by
3 posts views Thread by Chris Curvey | last post: by
reply views Thread by John Salerno | last post: by
7 posts views Thread by John Salerno | last post: by
4 posts views Thread by arorap | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.