Module WebStack.Helpers.Request
Request helper classes.
Copyright (C) 2004, 2005 Paul Boddie
<paul@boddie.org.uk>
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
Classes |
Cookie |
A simple cookie class for frameworks which do not return cookies in
structured form. |
MessageBodyStream |
A naive stream class, providing a non-blocking stream for transactions when
reading the message body. |
Function Summary |
|
filter_fields (all_fields,
fields_from_path)
Taking items from the 'all_fields' dictionary, produce a new
dictionary which does not contain items from the 'fields_from_path'
dictionary. |
|
get_body_field (field_str,
encoding)
Returns the appropriate value for the given 'field_str' string using
the given 'encoding'. |
|
get_body_fields (field_items,
encoding)
Returns a dictionary mapping field names to lists of field values for
all entries in the given 'field_items' (2-tuples of the form key, values)
using the given 'encoding'. |
|
get_fields_from_query_string (query_string,
decoder)
Returns a dictionary mapping field names to lists of values for the
data encoded in the given 'query_string'. |
|
get_storage_items (storage_body)
Return the items (2-tuples of the form key, values) from the
'storage_body'. |
filter_fields(all_fields,
fields_from_path)
Taking items from the 'all_fields' dictionary, produce a new
dictionary which does not contain items from the 'fields_from_path'
dictionary. Return a new dictionary.
-
|
get_body_field(field_str,
encoding)
Returns the appropriate value for the given 'field_str' string using
the given 'encoding'.
-
|
get_body_fields(field_items,
encoding)
Returns a dictionary mapping field names to lists of field values
for all entries in the given 'field_items' (2-tuples of the form key,
values) using the given 'encoding'. This is used in conjunction with
FieldStorage objects.
-
|
get_fields_from_query_string(query_string,
decoder)
Returns a dictionary mapping field names to lists of values for the
data encoded in the given 'query_string'. Use the given 'decoder'
function or method to process the URL-encoded values.
-
|
get_storage_items(storage_body)
Return the items (2-tuples of the form key, values) from the
'storage_body'. This is used in conjunction with FieldStorage
objects.
-
|