Commits

Anonymous committed a43b407

Added req.query_string, per Jacob Smullyan's suggestion. Fixed some tests that had drifted

Comments (0)

Files changed (3)

     'SERVER_NAME': 'localhost',
     'SERVER_PORT': '80',
     'SERVER_PROTOCOL': 'HTTP/1.0',
-    'wsgi.errors': <cStringIO.StringO object at ...>,
+    'wsgi.errors': <open file '<stderr>', mode 'w' at ...>,
     'wsgi.input': <cStringIO.StringI object at ...>,
     'wsgi.multiprocess': False,
     'wsgi.multithread': False,
     '/blog/article'
     >>> req.path_qs
     '/blog/article?id=1'
+    >>> req.query_string
+    'id=1'
 
 You can make new URLs:
 
     >>> print res
     200 OK
     content-type: text/plain
-    Content-Length: 388
+    Content-Length: 394
     <BLANKLINE>
     HTTP_HOST: 'localhost:80'
     PATH_INFO: '/'
     SERVER_NAME: 'localhost'
     SERVER_PORT: '80'
     SERVER_PROTOCOL: 'HTTP/1.0'
-    wsgi.errors: <cStringIO.StringO object at ...>
+    wsgi.errors: <open file '<stderr>', mode 'w' at ...>
     wsgi.input: <cStringIO.StringI object at ...>
     wsgi.multiprocess: False
     wsgi.multithread: False

tests/test_response.txt

     <Response ... 304 Not Modified>
     >>> res.etag = 'other-tag'
     >>> req.get_response(res)
-    <Response ... 304 Not Modified>
+    <Response ... 200 OK>
     >>> del req.if_none_match
     >>> req.if_modified_since = datetime(2005, 1, 1, 12, 1, tzinfo=UTC)
     >>> res.last_modified = datetime(2005, 1, 1, 12, 1, tzinfo=UTC)

webob/__init__.py

         _parse_int, _serialize_int, 'int')
     remote_user = environ_getter('REMOTE_USER', default=None)
     remote_addr = environ_getter('REMOTE_ADDR', default=None)
+    query_string = environ_getter('QUERY_STRING')
 
     _headers = None
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.