Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
deacce2c
Commit
deacce2c
authored
Aug 18, 2004
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #800236: add HTTPResponse.getheaders().
parent
c473c99d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
Doc/lib/libhttplib.tex
Doc/lib/libhttplib.tex
+4
-0
Lib/httplib.py
Lib/httplib.py
+6
-0
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Doc/lib/libhttplib.tex
View file @
deacce2c
...
...
@@ -211,6 +211,10 @@ Get the contents of the header \var{name}, or \var{default} if there is no
matching header.
\end{methoddesc}
\begin{methoddesc}
{
getheaders
}{}
Return a list of (header, value) tuples.
\versionadded
{
2.4
}
\end{methoddesc}
\begin{datadesc}
{
msg
}
A
\class
{
mimetools.Message
}
instance containing the response headers.
\end{datadesc}
...
...
Lib/httplib.py
View file @
deacce2c
...
...
@@ -493,6 +493,12 @@ class HTTPResponse:
raise
ResponseNotReady
()
return
self
.
msg
.
getheader
(
name
,
default
)
def
getheaders
(
self
):
"""Return list of (header, value) tuples."""
if
self
.
msg
is
None
:
raise
ResponseNotReady
()
return
self
.
msg
.
items
()
class
HTTPConnection
:
...
...
Misc/NEWS
View file @
deacce2c
...
...
@@ -44,6 +44,8 @@ Extension modules
Library
-------
-
HTTPResponse
has
now
a
getheaders
method
.
-
Patch
#
1006219
:
let
inspect
.
getsource
handle
'@'
decorators
.
Thanks
Simon
Percivall
.
...
...
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