1.1 --- a/WebStack/BaseHTTPRequestHandler.py Sat Feb 28 16:30:00 2004 +0000
1.2 +++ b/WebStack/BaseHTTPRequestHandler.py Sat Feb 28 20:55:18 2004 +0000
1.3 @@ -169,24 +169,19 @@
1.4 A framework-specific method which extracts the form fields from the
1.5 message body in the transaction.
1.6
1.7 - The returned object should employ the cgi.FieldStorage interface.
1.8 + Returns a dictionary mapping field names to lists of values (even if a
1.9 + single value is associated with any given field name).
1.10 """
1.11
1.12 - return FieldStorage(fp=self.get_request_stream(), headers=self.get_headers(),
1.13 - environ={"REQUEST_METHOD" : "POST"}, keep_blank_values=1)
1.14 + storage = FieldStorage(fp=self.get_request_stream(), headers=self.get_headers(),
1.15 + environ={"REQUEST_METHOD" : self.get_request_method()}, keep_blank_values=1)
1.16
1.17 - def get_fields(self):
1.18 + # Traverse the storage, finding each field value.
1.19
1.20 - """
1.21 - A framework-specific method which extracts the form fields from the
1.22 - transaction. Typically, the origin of the form fields will be affected
1.23 - by the method specified in the transaction.
1.24 -
1.25 - The returned object should employ the cgi.FieldStorage interface.
1.26 - """
1.27 -
1.28 - return FieldStorage(fp=self.get_request_stream(), headers=self.get_headers(),
1.29 - environ={"REQUEST_METHOD" : self.get_request_method()}, keep_blank_values=1)
1.30 + fields = {}
1.31 + for field_name in storage.keys():
1.32 + fields[field_name] = storage.getlist(field_name)
1.33 + return fields
1.34
1.35 def get_user(self):
1.36