|
From: Eric R. <th...@er...> - 2004-12-07 22:50:29
|
One of my applications is failing under wsgikit because it requires
input from both both POST and GET variables in the fields dictionary.
This is the test I'm using:
from wsgikit.webkit.wkservlet import Page
class test(Page):
def writeBodyParts(self):
self.writeln("""<p>Request Method: %s""" % self.request().method())
self.writeln("""<form method="POST" action="test.py?id=10"> <input
name='password' /> <input type="submit" /> </form>""")
self.writeln("""<p>Field variables:</p>""")
self.writeln("""<pre>""")
fields = self.request().fields()
for field in fields:
self.writeln("%s : %s" % (field, fields[field]))
self.writeln("""</pre>""")
Under Webware the fields dictionary contains the values from the query
string as well as the POST content. Webware overloads cgi.FieldStorage()
and creates a new class that explicitly parses the query string even if
the HTTP request type was not GET.
It's unclear to me how this should be implemented, but I assume it has
to tie into the HTTPRequest._setupFields() function in wkrequest.py
--
Eric Radman | http://eradman.com
|