[Python-modules-commits] [python-webob] 01/05: Import python-webob_1.6.1.orig.tar.gz
Barry Warsaw
barry at moszumanska.debian.org
Tue Jul 12 15:13:24 UTC 2016
This is an automated email from the git hooks/post-receive script.
barry pushed a commit to branch master
in repository python-webob.
commit b4f29c324f8fcb0bb1b28ee44ff0d7e66b76c5cb
Author: Barry Warsaw <barry at python.org>
Date: Tue Jul 12 10:30:26 2016 -0400
Import python-webob_1.6.1.orig.tar.gz
---
CHANGES.txt | 12 ++++++++++++
PKG-INFO | 14 +++++++++++++-
WebOb.egg-info/PKG-INFO | 14 +++++++++++++-
docs/whatsnew-1.6.txt | 7 ++++++-
setup.cfg | 2 +-
setup.py | 2 +-
tests/test_response.py | 7 +++++++
webob/response.py | 2 +-
8 files changed, 54 insertions(+), 6 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 1284c34..4721a4f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,15 @@
+1.6.1 (2016-05-20)
+------------------
+
+Bugfix
+~~~~~~
+
+- Response.from_file now parses the status line correctly when the status line
+ contains an HTTP with version, as well as a status text that contains
+ multiple white spaces (e.g 404 Not Found). See
+ https://github.com/Pylons/webob/issues/250
+
+
1.6.0 (2016-03-15)
------------------
diff --git a/PKG-INFO b/PKG-INFO
index d13a066..9099531 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: WebOb
-Version: 1.6.0
+Version: 1.6.1
Summary: WSGI request and response object
Home-page: http://webob.org/
Author: Pylons Project
@@ -45,6 +45,18 @@ Description: WebOb
+ 1.6.1 (2016-05-20)
+ ------------------
+
+ Bugfix
+ ~~~~~~
+
+ - Response.from_file now parses the status line correctly when the status line
+ contains an HTTP with version, as well as a status text that contains
+ multiple white spaces (e.g 404 Not Found). See
+ https://github.com/Pylons/webob/issues/250
+
+
1.6.0 (2016-03-15)
------------------
diff --git a/WebOb.egg-info/PKG-INFO b/WebOb.egg-info/PKG-INFO
index d13a066..9099531 100644
--- a/WebOb.egg-info/PKG-INFO
+++ b/WebOb.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: WebOb
-Version: 1.6.0
+Version: 1.6.1
Summary: WSGI request and response object
Home-page: http://webob.org/
Author: Pylons Project
@@ -45,6 +45,18 @@ Description: WebOb
+ 1.6.1 (2016-05-20)
+ ------------------
+
+ Bugfix
+ ~~~~~~
+
+ - Response.from_file now parses the status line correctly when the status line
+ contains an HTTP with version, as well as a status text that contains
+ multiple white spaces (e.g 404 Not Found). See
+ https://github.com/Pylons/webob/issues/250
+
+
1.6.0 (2016-03-15)
------------------
diff --git a/docs/whatsnew-1.6.txt b/docs/whatsnew-1.6.txt
index d395d3d..08be339 100644
--- a/docs/whatsnew-1.6.txt
+++ b/docs/whatsnew-1.6.txt
@@ -10,7 +10,7 @@ Security
~~~~~~~~
- exc._HTTPMove and any subclasses will now raise a ValueError if the location
- field contians a line feed or carriage return. These values may lead to
+ field contains a line feed or carriage return. These values may lead to
possible HTTP Response Splitting. The header_getter descriptor has also been
modified to no longer accept headers with a line feed or carriage return.
@@ -55,6 +55,11 @@ Features
Bugfixes
~~~~~~~~
+- Response.from_file now parses the status line correctly when the status line
+ contains an HTTP with version, as well as a status text that contains
+ multiple white spaces (e.g HTTP/1.1 404 Not Found). See
+ https://github.com/Pylons/webob/issues/250
+
- Request.decode would attempt to read from an already consumed stream, it is
now reading from the correct stream. See
https://github.com/Pylons/webob/pull/183 for more information.
diff --git a/setup.cfg b/setup.cfg
index 6a6391f..4a5941e 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -14,6 +14,6 @@ universal = 1
[egg_info]
tag_svn_revision = 0
-tag_build =
tag_date = 0
+tag_build =
diff --git a/setup.py b/setup.py
index f4c72f1..ecc2592 100644
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@ docs_extras = [
setup(
name='WebOb',
- version='1.6.0',
+ version='1.6.1',
description="WSGI request and response object",
long_description=README + '\n\n' + CHANGES,
classifiers=[
diff --git a/tests/test_response.py b/tests/test_response.py
index c0bfe79..6c94822 100644
--- a/tests/test_response.py
+++ b/tests/test_response.py
@@ -504,6 +504,13 @@ def test_file_with_http_version():
eq_(res.status_code, 200)
eq_(res.status, '200 OK')
+def test_file_with_http_version_more_status():
+ inp = io.BytesIO(b'HTTP/1.1 404 Not Found\r\n\r\nSome data...')
+
+ res = Response.from_file(inp)
+ assert res.status_code == 404
+ assert res.status == '404 Not Found'
+
def test_set_status():
res = Response()
res.status = "200"
diff --git a/webob/response.py b/webob/response.py
index 3d5fbc8..1cc41cd 100644
--- a/webob/response.py
+++ b/webob/response.py
@@ -176,7 +176,7 @@ class Response(object):
_http = b'HTTP/'
if status.startswith(_http):
- (http_ver, status_num, status_text) = status.split()
+ (http_ver, status_num, status_text) = status.split(None, 2)
status = '%s %s' % (native_(status_num), native_(status_text))
while 1:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-webob.git
More information about the Python-modules-commits
mailing list