packages.urllib3.util.response

Module Contents

Functions

is_fp_closed(obj) Checks whether a given file-like object is closed.
assert_header_parsing(headers) Asserts whether all headers have been successfully parsed.
is_response_to_head(response) Checks, wether a the request of a response has been a HEAD-request.
is_fp_closed(obj)

Checks whether a given file-like object is closed.

Parameters:obj – The file-like object to check.
assert_header_parsing(headers)

Asserts whether all headers have been successfully parsed. Extracts encountered errors from the result of parsing headers.

Only works on Python 3.

Parameters:headers (httplib.HTTPMessage.) – Headers to verify.
Raises:urllib3.exceptions.HeaderParsingError – If parsing errors are found.
is_response_to_head(response)

Checks, wether a the request of a response has been a HEAD-request. Handles the quirks of AppEngine.

Parameters:conn (httplib.HTTPResponse) –