Hello community,

here is the log from the commit of package python-WebOb for openSUSE:Factory 
checked in at 2017-08-04 11:58:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-WebOb (Old)
 and      /work/SRC/openSUSE:Factory/.python-WebOb.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-WebOb"

Fri Aug  4 11:58:54 2017 rev:24 rq:508803 version:1.7.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-WebOb/python-WebOb.changes        
2017-05-17 17:19:05.278866197 +0200
+++ /work/SRC/openSUSE:Factory/.python-WebOb.new/python-WebOb.changes   
2017-08-04 11:58:59.454923259 +0200
@@ -1,0 +2,8 @@
+Thu Jul  6 14:34:02 UTC 2017 - [email protected]
+
+- update to 1.7.3:
+  - Request.host_url, Request.host_port and Request.domain now all understand 
and
+    know how to parse IPv6 Host headers sent by browsers. See
+    https://github.com/Pylons/webob/pull/332
+
+-------------------------------------------------------------------

Old:
----
  WebOb-1.7.2.tar.gz

New:
----
  WebOb-1.7.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-WebOb.spec ++++++
--- /var/tmp/diff_new_pack.Zp2b2d/_old  2017-08-04 11:59:01.278665843 +0200
+++ /var/tmp/diff_new_pack.Zp2b2d/_new  2017-08-04 11:59:01.302662456 +0200
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define oldpython python
 Name:           python-WebOb
-Version:        1.7.2
+Version:        1.7.3
 Release:        0
 Summary:        WSGI request and response object
 License:        MIT

++++++ WebOb-1.7.2.tar.gz -> WebOb-1.7.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebOb-1.7.2/CHANGES.txt new/WebOb-1.7.3/CHANGES.txt
--- old/WebOb-1.7.2/CHANGES.txt 2017-03-16 05:06:14.000000000 +0100
+++ new/WebOb-1.7.3/CHANGES.txt 2017-06-30 23:11:43.000000000 +0200
@@ -1,3 +1,13 @@
+1.7.3 (2017-06-30)
+------------------
+
+Bugfix
+~~~~~~
+
+- Request.host_url, Request.host_port and Request.domain now all understand and
+  know how to parse IPv6 Host headers sent by browsers. See
+  https://github.com/Pylons/webob/pull/332
+
 1.7.2 (2017-03-15)
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebOb-1.7.2/PKG-INFO new/WebOb-1.7.3/PKG-INFO
--- old/WebOb-1.7.2/PKG-INFO    2017-03-16 05:27:34.000000000 +0100
+++ new/WebOb-1.7.3/PKG-INFO    2017-06-30 23:16:33.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: WebOb
-Version: 1.7.2
+Version: 1.7.3
 Summary: WSGI request and response object
 Home-page: http://webob.org/
 Author: Pylons Project
@@ -45,6 +45,16 @@
         
         
         
+        1.7.3 (2017-06-30)
+        ------------------
+        
+        Bugfix
+        ~~~~~~
+        
+        - Request.host_url, Request.host_port and Request.domain now all 
understand and
+          know how to parse IPv6 Host headers sent by browsers. See
+          https://github.com/Pylons/webob/pull/332
+        
         1.7.2 (2017-03-15)
         ------------------
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebOb-1.7.2/WebOb.egg-info/PKG-INFO 
new/WebOb-1.7.3/WebOb.egg-info/PKG-INFO
--- old/WebOb-1.7.2/WebOb.egg-info/PKG-INFO     2017-03-16 05:27:32.000000000 
+0100
+++ new/WebOb-1.7.3/WebOb.egg-info/PKG-INFO     2017-06-30 23:16:30.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: WebOb
-Version: 1.7.2
+Version: 1.7.3
 Summary: WSGI request and response object
 Home-page: http://webob.org/
 Author: Pylons Project
@@ -45,6 +45,16 @@
         
         
         
+        1.7.3 (2017-06-30)
+        ------------------
+        
+        Bugfix
+        ~~~~~~
+        
+        - Request.host_url, Request.host_port and Request.domain now all 
understand and
+          know how to parse IPv6 Host headers sent by browsers. See
+          https://github.com/Pylons/webob/pull/332
+        
         1.7.2 (2017-03-15)
         ------------------
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebOb-1.7.2/setup.py new/WebOb-1.7.3/setup.py
--- old/WebOb-1.7.2/setup.py    2017-03-16 05:06:22.000000000 +0100
+++ new/WebOb-1.7.3/setup.py    2017-06-30 23:11:18.000000000 +0200
@@ -24,7 +24,7 @@
 
 setup(
     name='WebOb',
-    version='1.7.2',
+    version='1.7.3',
     description="WSGI request and response object",
     long_description=README + '\n\n' + CHANGES,
     classifiers=[
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebOb-1.7.2/tests/test_request.py 
new/WebOb-1.7.3/tests/test_request.py
--- old/WebOb-1.7.2/tests/test_request.py       2017-03-16 05:05:57.000000000 
+0100
+++ new/WebOb-1.7.3/tests/test_request.py       2017-06-30 23:10:59.000000000 
+0200
@@ -1588,6 +1588,16 @@
         req = self._makeOne(environ)
         assert req.domain == 'example.com'
 
+    def test_domain_with_ipv6(self):
+        environ = {'HTTP_HOST': '[2001:DB8::1]:6453'}
+        req = self._makeOne(environ)
+        assert req.domain == '[2001:DB8::1]'
+
+    def test_domain_with_ipv6_no_port(self):
+        environ = {'HTTP_HOST': '[2001:DB8::1]'}
+        req = self._makeOne(environ)
+        assert req.domain == '[2001:DB8::1]'
+
     def test_encget_raises_without_default(self):
         inst = self._makeOne({})
         with pytest.raises(KeyError):
@@ -1926,6 +1936,18 @@
         req = self._makeOne(environ)
         assert req.host_port == '4333'
 
+    def test_host_port_ipv6(self):
+        environ = {'HTTP_HOST': '[2001:DB8::1]:6453'}
+        req = self._makeOne(environ)
+        assert req.host_port == '6453'
+
+    def test_host_port_ipv6(self):
+        environ = {'wsgi.url_scheme': 'https',
+                   'HTTP_HOST': '[2001:DB8::1]'
+                  }
+        req = self._makeOne(environ)
+        assert req.host_port == '443'
+
     def test_host_url_w_http_host_and_no_port(self):
         environ = {'wsgi.url_scheme': 'http',
                    'HTTP_HOST': 'example.com',
@@ -1976,6 +1998,20 @@
         req = self._makeOne(environ)
         assert req.host_url == 'https://example.com:4333'
 
+    def test_host_url_http_ipv6_host(self):
+        environ = {'wsgi.url_scheme': 'https',
+                   'HTTP_HOST': '[2001:DB8::1]:6453'
+                  }
+        req = self._makeOne(environ)
+        assert req.host_url == 'https://[2001:DB8::1]:6453'
+
+    def test_host_url_http_ipv6_host_no_port(self):
+        environ = {'wsgi.url_scheme': 'https',
+                   'HTTP_HOST': '[2001:DB8::1]'
+                  }
+        req = self._makeOne(environ)
+        assert req.host_url == 'https://[2001:DB8::1]'
+
     def test_application_url(self):
         inst = self._blankOne('/%C3%AB')
         inst.script_name = b'/\xc3\xab'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/WebOb-1.7.2/webob/request.py 
new/WebOb-1.7.3/webob/request.py
--- old/WebOb-1.7.2/webob/request.py    2017-03-16 05:05:57.000000000 +0100
+++ new/WebOb-1.7.3/webob/request.py    2017-06-30 23:10:59.000000000 +0200
@@ -420,8 +420,8 @@
         e = self.environ
         host = e.get('HTTP_HOST')
         if host is not None:
-            if ':' in host:
-                host, port = host.split(':', 1)
+            if ':' in host and host[-1] != ']':
+                host, port = host.rsplit(':', 1)
             else:
                 url_scheme = e['wsgi.url_scheme']
                 if url_scheme == 'https':
@@ -442,8 +442,8 @@
         url = scheme + '://'
         host = e.get('HTTP_HOST')
         if host is not None:
-            if ':' in host:
-                host, port = host.split(':', 1)
+            if ':' in host and host[-1] != ']':
+                host, port = host.rsplit(':', 1)
             else:
                 port = None
         else:
@@ -674,8 +674,8 @@
         .. code-block:: python
 
            domain = request.host
-           if ':' in domain:
-               domain = domain.split(':', 1)[0]
+           if ':' in domain and domain[-1] != ']': # Check for ] because of 
IPv6
+               domain = domain.rsplit(':', 1)[0]
 
         This will be equivalent to the domain portion of the ``HTTP_HOST``
         value in the environment if it exists, or the ``SERVER_NAME`` value in
@@ -687,8 +687,8 @@
         value use :meth:`webob.request.Request.host` instead.
         """
         domain = self.host
-        if ':' in domain:
-            domain = domain.split(':', 1)[0]
+        if ':' in domain and domain[-1] != ']':
+            domain = domain.rsplit(':', 1)[0]
         return domain
 
     @property


Reply via email to