Commits

Anonymous committed 2ca1ca8

Default to wsgi.errors=sys.stderr. Fix totally broken conditional response when if-none-match and etag are both set

Comments (0)

Files changed (2)

tests/test_response.txt

     (['GET', 'PUT'], 'GET, PUT')
     >>> res.cache_control
     <CacheControl ''>
+    >>> print res.cache_control.max_age
+    None
+    >>> res.cache_control.properties['max-age'] = None
+    >>> print res.cache_control.max_age
+    -1
     >>> res.cache_control.max_age = 10
     >>> res.cache_control
     <CacheControl 'max-age=10'>

webob/__init__.py

 from cStringIO import StringIO
+import sys
 import cgi
 import urllib
 import urlparse
             'wsgi.version': (1, 0),
             'wsgi.url_scheme': scheme,
             'wsgi.input': StringIO(''),
-            'wsgi.errors': StringIO(),
+            'wsgi.errors': sys.stderr,
             'wsgi.multithread': False,
             'wsgi.multiprocess': False,
             'wsgi.run_once': False,
                     status304 = True
                 else:
                     # Even if If-Modified-Since matched, if ETag doesn't then reject it
-                    status304 = True
+                    status304 = False
         if status304:
             start_response('304 Not Modified', self.headerlist)
             return []