~brian-thomason/+junk/python-tornado

« back to all changes in this revision

Viewing changes to tornado/web.py

  • Committer: Brian Thomason
  • Date: 2012-08-01 21:02:05 UTC
  • Revision ID: brian.thomason@canonical.com-20120801210205-clci8wc492tdevt9
Removed patches that shouldn't have been applied till build time

Show diffs side-by-side

added added

removed removed

Lines of Context:
258
258
        # If \n is allowed into the header, it is possible to inject
259
259
        # additional headers or split the request. Also cap length to
260
260
        # prevent obviously erroneous values.
261
 
        if len(value) > 4000 or re.search(b(r"[\x00-\x1f]"), value):
 
261
        if len(value) > 4000 or re.match(b(r"[\x00-\x1f]"), value):
262
262
            raise ValueError("Unsafe header value %r", value)
263
263
        return value
264
264