Channel by which the request entered and response will be written
The initial HTTP request associated with this chunk
Incoming chunk of data for processing
Array of accepted encoding for content compression from the HTTP header
Array of accepted encoding for content compression from the HTTP header
For example, give then header Accept-Encoding: gzip, deflate, then an array containing
gzip and defalte will be returned.
Cache that can be use to pass data from handler to processor and between processors
Cache that can be use to pass data from handler to processor and between processors
Channel by which the request entered and response will be written
Channel by which the request entered and response will be written
HTTP end point used by this chunk
HTTP end point used by this chunk
Incoming chunk of data for processing
The initial HTTP request associated with this chunk
True if and only if this connection is to be kept alive and the channel should NOT be closed
after a response is returned.
True if and only if this connection is to be kept alive and the channel should NOT be closed
after a response is returned.
This flag is controlled by the existence of the keep alive HTTP header.
Connection: keep-alive
Flag to indicate if this is the last chunk
Headers associated with the last chunk
Get content as byte array.
Get content as byte array. Empty array is returned if there is no content
Get content as a string.
Get content as a string. Empty string is returned if there is no content.
Character set to use to convert data to string
Get content as a UTF8 string.
Get content as a UTF8 string. Empty string is returned if there is no content.
Redirects the browser to the specified URL using the 302 HTTP status code.
Redirects the browser to the specified URL using the 302 HTTP status code.
Request
GET /index.html HTTP/1.1 Host: www.example.com
Response
HTTP/1.1 302 Found Location: http://www.newurl.org/
URL to which the browser will be redirected
Sets the content type header for the HTTP Response
Sets the content type header for the HTTP Response
For example:
Content-Type: image/gif
HTTP response
MIME type
Sets the content type header for the HTTP Response based on the file name extension
Sets the content type header for the HTTP Response based on the file name extension
For example:
Content-Type: image/gif
This implementation uses
MimetypesFileTypeMap and relies on the presence of the file extening in a mime.types file.
HTTP response
file to extract content type
Sets the Date, Last-Modified, Expires and Cache-Control headers in the HTTP Response
Sets the Date, Last-Modified, Expires and Cache-Control headers in the HTTP Response
For example:
Date: Tue, 01 Mar 2011 22:44:26 GMT Last-Modified: Wed, 30 Jun 2010 21:36:48 GMT Expires: Tue, 01 Mar 2012 22:44:26 GMT Cache-Control: private, max-age=31536000
HTTP response
When the file was last modified
Number of seconds for which the file should be cached by the browser
Sets the Date header in the HTTP response.
Sets the Date header in the HTTP response.
For example:
Date: Tue, 01 Mar 2011 22:44:26 GMT
HTTP response
Sets the connection header for the HTTP Response
Sets the connection header for the HTTP Response
According to HTTP 1.1 specifications: The Connection header field with a keep-alive keyword must be sent on all requests and responses that wish to continue the persistence.
For example:
Connection: keep-alive
HTTP response
Sends a HTTP error response to the client.
Sends a HTTP error response to the client.
HTTP error status indicating the nature of the error
Option flag to force closing channel. Default is false and channel will only be
closed if keep-alive header is not set.
Optional error message. If not supplied, status description will be used.
Sends a binary HTTP response to the client with a status of "200 OK".
Sends a binary HTTP response to the client with a status of "200 OK".
String to send
MIME content type to set in the response header. For example, "image/gif"
Additional headers to add to the HTTP response. Defaults to empty map; i.e. no additional headers.
Sends a string HTTP response to the client with a status of "200 OK".
Sends a string HTTP response to the client with a status of "200 OK".
String to send
MIME content type to set in the response header. Defaults to "text/plain; charset=UTF-8".
Character set encoding. Defaults to "UTF-8"
Additional headers to add to the HTTP response. Defaults to empty map; i.e. no additional headers.
Context for processing HTTP chunks.
The HttpChunkProcessingContext will only be sent to processors:
isChunkedproperty is set toTrue.Channel by which the request entered and response will be written
The initial HTTP request associated with this chunk
Incoming chunk of data for processing