Skip to content
This repository was archived by the owner on Mar 18, 2019. It is now read-only.

Commit eb0cd25

Browse files
committed
Match credentials against hostname, not hostname:port
1 parent 1fe341e commit eb0cd25

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

coreapi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from coreapi import codecs, history, transports
77

88

9-
__version__ = '1.13.2'
9+
__version__ = '1.13.3'
1010
__all__ = [
1111
'Array', 'Document', 'Link', 'Object', 'Error', 'Field',
1212
'ParseError', 'NotAcceptable', 'TransportError', 'ErrorMessage',

coreapi/transports/http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def _get_headers(url, decoders=None, credentials=None, extra_headers=None):
7272
if credentials:
7373
# Include any authorization credentials relevant to this domain.
7474
url_components = urlparse.urlparse(url)
75-
host = url_components.netloc
75+
host = url_components.hostname
7676
if host in credentials:
7777
headers['authorization'] = credentials[host]
7878

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy