Net::IMP::HTTP - interface for HTTP specific Net::IMP plugins
The Net::IMP::HTTP modules make it easier to write HTTP specific IMP plugins. We distinguish between HTTP connection specific plugins and HTTP request specific plugins. The differences are:
The offset in the return values of the plugins relates for connection specific plugins to the connection (which might contain multiple requests), while for request specific plugins it starts anew for each request.
Similar IMP_MAXOFFSET means the end of connection for connection specific plugins, while end of request for request specific plugins.
Connection specific plugins get info about framing, e.g. junk data and framing of chunked encoding (chunked header and trailers). Request specific plugins only get header and content.
Connection specific plugins see the raw bodies of the request, while request specific plugins see the content, e.g. the body stripped from framing (chunked encoding) and transfer encodings (this includes content-encodings for compression, which are in reality used as transfer encodings).
Similar it is expected, that connection specific plugins fix framing or content-length headers themself, when changing data. For request specific plugins the caller of the plugin is expected to adjust these.
The following modules are currently implemented or planned:
This module provides the data type definitions for HTTP connection and request types.
This module is a base class for IMP plugins working with HTTP connection types.
This module is a base class for IMP plugins working with HTTP request types.
Using this module can adapt HTTP connection specific plugins into a simple stream interface (IMP_DATA_STREAM)
- Net::IMP::Adaptor::STREAM2HTTPReq (planned)
Using this module can adapt HTTP request specific plugins into a simple stream interface (IMP_DATA_STREAM).
Net::IMP::HTTP defines the following constants for HTTP specific data types
- connection specific types
IMP_DATA_HTTP_HEADER - request and response header IMP_DATA_HTTP_BODY - request and response body chunks (stream) IMP_DATA_HTTP_CHKHDR - chunk header in chunked transfer encoding IMP_DATA_HTTP_CHKTRAILER - chunk trailer in chunked transfer encoding IMP_DATA_HTTP_DATA - arbitrary data after connection upgrades (stream) IMP_DATA_HTTP_JUNK - junk data (leading new lines before header..)
- request specific types
IMP_DATA_HTTPRQ_HEADER - request and response header IMP_DATA_HTTPRQ_CONTENT - request and response body chunks (stream) IMP_DATA_HTTPRQ_DATA - arbitrary data after connection upgrades (stream)
Steffen Ullrich, <firstname.lastname@example.org>
Copyright 2013 Steffen Ullrich
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.