Skip to content

Commit

Permalink
Expose raw_headers (#113)
Browse files Browse the repository at this point in the history
(Also reorder the class documentation a bit and remove duplicate
headers documentation.)

Fixes #112.
  • Loading branch information
annevk authored and jgraham committed Feb 20, 2017
1 parent 662d5ed commit c7bf515
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions wptserve/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,6 @@ class Request(object):
Absolute URL for the request.
.. attribute:: headers
List of request headers.
.. attribute:: raw_input
File-like object representing the body of the request.
.. attribute:: url_parts
Parts of the requested URL as obtained by urlparse.urlsplit(path)
Expand All @@ -208,10 +200,18 @@ class Request(object):
RequestHeaders object providing a dictionary-like representation of
the request headers.
.. attribute:: raw_headers.
Dictionary of non-normalized request headers.
.. attribute:: body
Request body as a string
.. attribute:: raw_input
File-like object representing the body of the request.
.. attribute:: GET
MultiDict representing the parameters supplied with the request.
Expand Down Expand Up @@ -268,7 +268,7 @@ def __init__(self, request_handler):
self.request_path)
self.url_parts = urlsplit(self.url)

self._raw_headers = request_handler.headers
self.raw_headers = request_handler.headers

self.request_line = request_handler.raw_requestline

Expand Down Expand Up @@ -326,7 +326,7 @@ def cookies(self):
@property
def headers(self):
if self._headers is None:
self._headers = RequestHeaders(self._raw_headers)
self._headers = RequestHeaders(self.raw_headers)
return self._headers

@property
Expand Down

0 comments on commit c7bf515

Please sign in to comment.