twisted.web.test.test_newclient._HTTPParserTests(object) class documentationtwisted.web.test.test_newclient
(View In Hierarchy)
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_statusCallback | HTTPParsercalls itsstatusReceivedmethod when it receives a status 
line. | 
| Method | test_headerCallback | HTTPParsercalls itsheaderReceivedmethod when it receives a header. | 
| Method | test_continuedHeaderCallback | If a header is split over multiple lines, HTTPParsercallsheaderReceivedwith the entire value once it is 
received. | 
| Method | test_fieldContentWhitespace | Leading and trailing linear whitespace is stripped from the header value
passed to the headerReceivedcallback. | 
| Method | test_allHeadersCallback | After the last header is received, HTTPParsercallsallHeadersReceived. | 
| Method | test_noHeaderCallback | If there are no headers in the message, HTTPParserdoes not callheaderReceived. | 
| Method | test_headersSavedOnResponse | All headers received by HTTPParserare added toHTTPParser.headers. | 
| Method | test_connectionControlHeaders | HTTPParser.isConnectionControlHeaderreturnsTruefor headers which are always connection control 
headers (similar to "hop-by-hop" headers from RFC 2616 section 
13.5.1) andFalsefor other headers. | 
| Method | test_switchToBodyMode | HTTPParser.switchToBodyModeraisesRuntimeErrorif called more than once. | 
| Method | _headerTestSetup | Undocumented | 
HTTPParser 
calls its statusReceived method when it receives a status 
line.
HTTPParser 
calls its headerReceived method when it receives a header.
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.
After the last header is received, HTTPParser 
calls allHeadersReceived.
If there are no headers in the message, HTTPParser 
does not call headerReceived.
All headers received by HTTPParser 
are added to HTTPParser.headers.
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.
HTTPParser.switchToBodyMode
raises RuntimeError
if called more than once.