Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
b4758b57
Commit
b4758b57
authored
Aug 28, 2012
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python: renamed uri as url for consistency
parent
33d35912
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
python/spdylay.pyx
python/spdylay.pyx
+20
-20
No files found.
python/spdylay.pyx
View file @
b4758b57
...
...
@@ -1488,8 +1488,8 @@ try:
from
urllib.parse
import
urlsplit
class
BaseSPDYStreamHandler
:
def
__init__
(
self
,
ur
i
,
fetcher
):
self
.
ur
i
=
uri
def
__init__
(
self
,
ur
l
,
fetcher
):
self
.
ur
l
=
url
self
.
fetcher
=
fetcher
self
.
stream_id
=
None
...
...
@@ -1506,9 +1506,9 @@ try:
pass
class
UrlFetcher
:
def
__init__
(
self
,
server_address
,
ur
i
s
,
StreamHandlerClass
):
def
__init__
(
self
,
server_address
,
ur
l
s
,
StreamHandlerClass
):
self
.
server_address
=
server_address
self
.
handlers
=
[
StreamHandlerClass
(
ur
i
,
self
)
for
uri
in
uri
s
]
self
.
handlers
=
[
StreamHandlerClass
(
ur
l
,
self
)
for
url
in
url
s
]
self
.
streams
=
{}
self
.
finished
=
[]
...
...
@@ -1601,7 +1601,7 @@ try:
self
.
server_address
[
1
])
for
handler
in
self
.
handlers
:
res
=
urlsplit
(
handler
.
ur
i
)
res
=
urlsplit
(
handler
.
ur
l
)
if
res
.
path
:
path
=
res
.
path
else
:
...
...
@@ -1644,33 +1644,33 @@ try:
[
self
.
sock
]
if
want_write
else
[],
[])
def
_urlfetch_session_one
(
ur
i
s
,
StreamHandlerClass
):
res
=
urlsplit
(
ur
i
s
[
0
])
def
_urlfetch_session_one
(
ur
l
s
,
StreamHandlerClass
):
res
=
urlsplit
(
ur
l
s
[
0
])
if
res
.
scheme
!=
'https'
:
raise
UrlFetchError
(
'Unsupported scheme {}'
.
format
(
res
.
scheme
))
hostname
=
res
.
hostname
port
=
res
.
port
if
res
.
port
else
443
f
=
UrlFetcher
((
hostname
,
port
),
ur
i
s
,
StreamHandlerClass
)
f
=
UrlFetcher
((
hostname
,
port
),
ur
l
s
,
StreamHandlerClass
)
f
.
loop
()
def
urlfetch
(
ur
i_or_uri
s
,
StreamHandlerClass
):
if
isinstance
(
ur
i_or_uri
s
,
str
):
_urlfetch_session_one
([
ur
i_or_uri
s
],
StreamHandlerClass
)
def
urlfetch
(
ur
l_or_url
s
,
StreamHandlerClass
):
if
isinstance
(
ur
l_or_url
s
,
str
):
_urlfetch_session_one
([
ur
l_or_url
s
],
StreamHandlerClass
)
else
:
ur
i
s
=
[]
ur
l
s
=
[]
prev_addr
=
(
None
,
None
)
for
ur
i
in
uri_or_uri
s
:
res
=
urlsplit
(
ur
i
)
for
ur
l
in
url_or_url
s
:
res
=
urlsplit
(
ur
l
)
port
=
res
.
port
if
res
.
port
else
443
if
prev_addr
!=
(
res
.
hostname
,
port
):
if
ur
i
s
:
_urlfetch_session_one
(
ur
i
s
,
StreamHandlerClass
)
ur
i
s
=
[]
if
ur
l
s
:
_urlfetch_session_one
(
ur
l
s
,
StreamHandlerClass
)
ur
l
s
=
[]
prev_addr
=
(
res
.
hostname
,
port
)
ur
is
.
append
(
uri
)
if
ur
i
s
:
_urlfetch_session_one
(
ur
i
s
,
StreamHandlerClass
)
ur
ls
.
append
(
url
)
if
ur
l
s
:
_urlfetch_session_one
(
ur
l
s
,
StreamHandlerClass
)
except
ImportError
:
# No server for 2.x because they lack TLS NPN.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment