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 HTTPParser calls its statusReceived method when it receives a status line.
Method test_headerCallback HTTPParser calls its headerReceived method when it receives a header.
Method test_continuedHeaderCallback If a header is split over multiple lines, HTTPParser calls headerReceived with the entire value once it is received.
Method test_fieldContentWhitespace Leading and trailing linear whitespace is stripped from the header value passed to the headerReceived callback.
Method test_allHeadersCallback After the last header is received, HTTPParser calls allHeadersReceived.
Method test_noHeaderCallback If there are no headers in the message, HTTPParser does not call headerReceived.
Method test_headersSavedOnResponse All headers received by HTTPParser are added to HTTPParser.headers.
Method test_connectionControlHeaders 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_switchToBodyMode HTTPParser.switchToBodyMode raises RuntimeError if called more than once.
Method _headerTestSetup Undocumented
def test_statusCallback(self):

HTTPParser calls its statusReceived method when it receives a status line.

def _headerTestSetup(self):
Undocumented
def test_headerCallback(self):

HTTPParser calls its headerReceived method when it receives a header.

def test_continuedHeaderCallback(self):

If a header is split over multiple lines, HTTPParser calls headerReceived with the entire value once it is received.

def test_fieldContentWhitespace(self):

Leading and trailing linear whitespace is stripped from the header value passed to the headerReceived callback.

def test_allHeadersCallback(self):

After the last header is received, HTTPParser calls allHeadersReceived.

def test_noHeaderCallback(self):

If there are no headers in the message, HTTPParser does not call headerReceived.

def test_headersSavedOnResponse(self):

All headers received by HTTPParser are added to HTTPParser.headers.

def test_connectionControlHeaders(self):

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.

def test_switchToBodyMode(self):

HTTPParser.switchToBodyMode raises RuntimeError if called more than once.

API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.