class documentation
class _HTTPParserTests: (source)
Known subclasses: twisted.web.test.test_newclient.HTTPParserNonRFCComplaintDelimeterTests
, twisted.web.test.test_newclient.HTTPParserRFCComplaintDelimeterTests
Base test class for HTTPParser
which is responsible for the bulk of the task of parsing HTTP bytes.
Method | test_all |
After the last header is received, HTTPParser calls allHeadersReceived. |
Method | test_connection |
HTTPParser.isConnectionControlHeader returns True for headers which are always connection control headers (similar to "hop-by-hop" headers from RFC 2616 section 13.5.1) and False for other headers. |
Method | test_continued |
If a header is split over multiple lines, HTTPParser calls headerReceived with the entire value once it is received. |
Method | test_field |
Leading and trailing linear whitespace is stripped from the header value passed to the headerReceived callback. |
Method | test_header |
HTTPParser calls its headerReceived method when it receives a header. |
Method | test_headers |
All headers received by HTTPParser are added to HTTPParser.headers . |
Method | test_no |
If there are no headers in the message, HTTPParser does not call headerReceived. |
Method | test_status |
HTTPParser calls its statusReceived method when it receives a status line. |
Method | test_switch |
HTTPParser.switchToBodyMode raises RuntimeError if called more than once. |
Class Variable | sep |
Undocumented |
Method | _header |
Undocumented |
HTTPParser.isConnectionControlHeader
returns True for headers which are always connection control headers (similar to "hop-by-hop" headers from RFC 2616 section 13.5.1) and False for other headers.
If a header is split over multiple lines, HTTPParser
calls headerReceived with the entire value once it is received.
Leading and trailing linear whitespace is stripped from the header value passed to the headerReceived callback.