t; > print e
> > else:
> > print req
> > print req.headers
> > print req.text
> > --
> > arguments always get FieldStorage(None, None, [])
> >
> >
> > and i us
arguments always get FieldStorage(None, None, [])
and i use other post way, it works.
--
login
http://abc.com:11/ip/"; method="post">
--
is this any problem requests.post(python) with cgi.FieldStorage ?
Thanks
--
https://mail.python.org/mailman/listinfo/python-list
---
> arguments always get FieldStorage(None, None, [])
>
>
> and i use other post way, it works.
> --
>
> login
>
> http://abc.com:11/ip/"; method="post">
>
>
>
>
>
>
> --
>
> is this any problem requests.post(python) with cgi.FieldStorage ?
>
>
> Thanks
Server : Apache/2.4.10 (Debian)
--
https://mail.python.org/mailman/listinfo/python-list
gert schrieb:
On Jul 25, 2:33 am, "Diez B. Roggisch" wrote:
gert schrieb:
On Jul 24, 7:32 pm, "Diez B. Roggisch" wrote:
gert schrieb:
this is a non standard way to store multi part post data on disk
def application(environ, response):
with open('/usr/httpd/var/wsgiTemp','w') as f:
On Jul 25, 2:33 am, "Diez B. Roggisch" wrote:
> gert schrieb:
>
> > On Jul 24, 7:32 pm, "Diez B. Roggisch" wrote:
> >> gert schrieb:
>
> >>> this is a non standard way to store multi part post data on disk
> >>> def application(environ, response):
> >>> with open('/usr/httpd/var/wsgiTemp','w'
gert schrieb:
On Jul 24, 7:32 pm, "Diez B. Roggisch" wrote:
gert schrieb:
this is a non standard way to store multi part post data on disk
def application(environ, response):
with open('/usr/httpd/var/wsgiTemp','w') as f:
while True:
chunk = environ['wsgi.input'].read(
On Jul 24, 7:32 pm, "Diez B. Roggisch" wrote:
> gert schrieb:
>
> > this is a non standard way to store multi part post data on disk
>
> > def application(environ, response):
> > with open('/usr/httpd/var/wsgiTemp','w') as f:
> > while True:
> > chunk = environ['wsgi.input'
gert schrieb:
this is a non standard way to store multi part post data on disk
def application(environ, response):
with open('/usr/httpd/var/wsgiTemp','w') as f:
while True:
chunk = environ['wsgi.input'].read(8192).decode('latin1')
if not chunk: break
this is a non standard way to store multi part post data on disk
def application(environ, response):
with open('/usr/httpd/var/wsgiTemp','w') as f:
while True:
chunk = environ['wsgi.input'].read(8192).decode('latin1')
if not chunk: break
f.write(chun
pecific to the ActivePython distribution.
Here is the relevant code:
class MyHandler(http.server.BaseHTTPRequestHandler):
def do_POST(self):
try:
print( "Calling cgi.FieldStorage()" )
form = cgi.FieldStorage(
fp=self.rfile,
work just like CGI.
>
> I wouldn't rely on it being exactly the same. The way it works uses a
> number of kludges. Also, the mod_python.cgihandler code in mod_python
> doesn't really get much attention from mod_python developers anymore
> and not sure if it was even specifica
ython developers anymore
and not sure if it was even specifically retested when mod_python 3.3
was released.
> Any clue why the
> cgi.FieldStorage()might not be working ?
Have no idea why it doesn't work as works as written on MacOS X even
when mod_python.cgihandler is used.
You
Thanks for your reply.
The reason I want to run it as CGI (even though mod_php is available
on my local computer) is that the target machine to which I will
finally be uploading my scripts runs CGI.
cgihandler should work just like CGI. Any clue why the
cgi.FieldStorage()might not be working
On Jun 13, 1:17 am, arorap <[EMAIL PROTECTED]> wrote:
> I've mod_php installed with Apache 2.2. In one of my folders, I'm
> using the cgihandler as the PythonHandler as my target host runs
> python only as CGI. Here cgi.FieldStorage() doesn't seem to work. I
> c
I've mod_php installed with Apache 2.2. In one of my folders, I'm
using the cgihandler as the PythonHandler as my target host runs
python only as CGI. Here cgi.FieldStorage() doesn't seem to work. I
can see the form data in sys.stdin but cgi.FieldStorage() returns an
empty diction
"Chris Curvey" <[EMAIL PROTECTED]> writes:
> I can't be the first person to want to do this, but I also can't seem
> to find a solution. (Perhaps my Google skills are poor today.) How
> can I emulate cgi.FieldStorage() for my unit tests so that I don'
figured it out...
os.environ["QUERY_STRING"] = "foo=bar"
fs = cgi.FieldStorage()
functionToBeTested(fs)
--
http://mail.python.org/mailman/listinfo/python-list
Chris Curvey wrote:
> I can't be the first person to want to do this, but I also can't seem
> to find a solution. (Perhaps my Google skills are poor today.) How
> can I emulate cgi.FieldStorage() for my unit tests so that I don't have
> to put a web server in the way?
I can't be the first person to want to do this, but I also can't seem
to find a solution. (Perhaps my Google skills are poor today.) How
can I emulate cgi.FieldStorage() for my unit tests so that I don't have
to put a web server in the way?
what I'd like to do i
Jonas:
> in this application, i need keys to be delivered with the url, some
with
> and some without value (for example 'script.py?key1&key2=foo'.
You are missing an "=" sign after key1. Confront with this example:
from cgi import parse_qsl
QS = "x=1&y=2&x=3&z=&y=4"
print parse_qsl(QS)
print par
Jonas Meurer wrote:
"key1" isn't a valid parameter, to supply an empty key you would write
script.py?key1=&key2=foo
Then cgi.FieldStorage also includes key1.
great, it works. but is there no way to use single keywords as GET
argument?
You could manually parse the request str
On 20/02/2005 Daniel Lichtenberger wrote:
> > any suggestions about how to make form.keys() contain the blank keys
> > as well?
>
> "key1" isn't a valid parameter, to supply an empty key you would write
> script.py?key1=&key2=foo
>
> Then cgi.Fie
o supply an empty key you would write
script.py?key1=&key2=foo
Then cgi.FieldStorage also includes key1.
bye,
Daniel
--
For mail replies please use my address from
http://perplex.schmumpf.de/
http://www.gametective.de/
--
http://mail.python.org/mailman/listinfo/python-list
ready figured out that i need to give
non-empty keep_blank_values as argument to cgi.FieldStorage, to make it
not cut all the empty keywords.
anyway, this still doesn't work really good:
---snip---
form = cgi.FieldStorage(keep_blank_values=1)
print 'list keys with form.keys():'
ke
24 matches
Mail list logo