#include <http.h>
Classes | |
| struct | http_response_t |
| struct | http_version_t |
Public Types | |
| enum | http_status_e { CONTINUE = 100, SWITCHPROTOCOLS = 101, OK = 200, CREATED = 201, ACCEPTED = 202, NON_AUTHORITATIVE = 203, NO_CONTENT = 204, RESET_CONTENT = 205, PARTIAL_CONTENT = 206, MULTIPLE_CHOICES = 300, MOVED_PERMANENTLY = 301, FOUND = 302, SEE_OTHER = 303, NOT_MODIFIED = 304, USE_PROXY = 305, TEMPORARY_REDIRECT = 307, BAD_REQUEST = 400, UNAUTHORIZED = 401, PAYMENT_REQUIRED = 402, FORBIDDEN = 403, NOT_FOUND = 404, METHOD_NOT_ALLOWED = 405, NOT_ACCEPTABLE = 406, PROXY_AUTHENTICATION_REQUIRED = 407, REQUEST_TIMEOUT = 408, CONFLICT = 409, GONE = 410, LENGTH_REQUIRED = 411, PRECONDITION_FAILED = 412, REQUEST_ENTITY_TOO_LARGE = 413, REQUEST_URI_TOO_LARGE = 414, UNSUPPORTED_MEDIA_TYPE = 415, REQUESTED_RANGE_NOT_SATISFIABLE = 416, EXPECTATION_FAILED = 417, INTERNAL_SERVER_ERROR = 500, NOT_IMPLEMENTED = 501, BAD_GATEWAY = 502, SERVICE_UNAVAILABLE = 503, GATEWAY_TIMEOUT = 504, HTTP_VERSION_NOT_SUPPORTED = 505, LIFE_IS_GOOD = 1234, CLOSEPIPE = 1235, CONTINUE = 100, SWITCHPROTOCOLS = 101, OK = 200, CREATED = 201, ACCEPTED = 202, NON_AUTHORITATIVE = 203, NO_CONTENT = 204, RESET_CONTENT = 205, PARTIAL_CONTENT = 206, MULTIPLE_CHOICES = 300, MOVED_PERMANENTLY = 301, FOUND = 302, SEE_OTHER = 303, NOT_MODIFIED = 304, USE_PROXY = 305, TEMPORARY_REDIRECT = 307, BAD_REQUEST = 400, UNAUTHORIZED = 401, PAYMENT_REQUIRED = 402, FORBIDDEN = 403, NOT_FOUND = 404, METHOD_NOT_ALLOWED = 405, NOT_ACCEPTABLE = 406, PROXY_AUTHENTICATION_REQUIRED = 407, REQUEST_TIMEOUT = 408, CONFLICT = 409, GONE = 410, LENGTH_REQUIRED = 411, PRECONDITION_FAILED = 412, REQUEST_ENTITY_TOO_LARGE = 413, REQUEST_URI_TOO_LARGE = 414, UNSUPPORTED_MEDIA_TYPE = 415, REQUESTED_RANGE_NOT_SATISFIABLE = 416, EXPECTATION_FAILED = 417, INTERNAL_SERVER_ERROR = 500, NOT_IMPLEMENTED = 501, BAD_GATEWAY = 502, SERVICE_UNAVAILABLE = 503, GATEWAY_TIMEOUT = 504, HTTP_VERSION_NOT_SUPPORTED = 505, LIFE_IS_GOOD = 1234, CLOSEPIPE = 1235 } |
| enum | http_method_e { HTTP_NONE, HTTP_OPTIONS, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_DELETE, HTTP_TRACE, HTTP_CONNECT, HTTP_RESPONSE, HTTP_NONE, HTTP_OPTIONS, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_DELETE, HTTP_TRACE, HTTP_CONNECT, HTTP_RESPONSE } |
| enum | rtmpt_cmd_e { OPEN, SEND, IDLE, CLOSE, OPEN, SEND, IDLE, CLOSE } |
| enum | http_status_e { CONTINUE = 100, SWITCHPROTOCOLS = 101, OK = 200, CREATED = 201, ACCEPTED = 202, NON_AUTHORITATIVE = 203, NO_CONTENT = 204, RESET_CONTENT = 205, PARTIAL_CONTENT = 206, MULTIPLE_CHOICES = 300, MOVED_PERMANENTLY = 301, FOUND = 302, SEE_OTHER = 303, NOT_MODIFIED = 304, USE_PROXY = 305, TEMPORARY_REDIRECT = 307, BAD_REQUEST = 400, UNAUTHORIZED = 401, PAYMENT_REQUIRED = 402, FORBIDDEN = 403, NOT_FOUND = 404, METHOD_NOT_ALLOWED = 405, NOT_ACCEPTABLE = 406, PROXY_AUTHENTICATION_REQUIRED = 407, REQUEST_TIMEOUT = 408, CONFLICT = 409, GONE = 410, LENGTH_REQUIRED = 411, PRECONDITION_FAILED = 412, REQUEST_ENTITY_TOO_LARGE = 413, REQUEST_URI_TOO_LARGE = 414, UNSUPPORTED_MEDIA_TYPE = 415, REQUESTED_RANGE_NOT_SATISFIABLE = 416, EXPECTATION_FAILED = 417, INTERNAL_SERVER_ERROR = 500, NOT_IMPLEMENTED = 501, BAD_GATEWAY = 502, SERVICE_UNAVAILABLE = 503, GATEWAY_TIMEOUT = 504, HTTP_VERSION_NOT_SUPPORTED = 505, LIFE_IS_GOOD = 1234, CLOSEPIPE = 1235, CONTINUE = 100, SWITCHPROTOCOLS = 101, OK = 200, CREATED = 201, ACCEPTED = 202, NON_AUTHORITATIVE = 203, NO_CONTENT = 204, RESET_CONTENT = 205, PARTIAL_CONTENT = 206, MULTIPLE_CHOICES = 300, MOVED_PERMANENTLY = 301, FOUND = 302, SEE_OTHER = 303, NOT_MODIFIED = 304, USE_PROXY = 305, TEMPORARY_REDIRECT = 307, BAD_REQUEST = 400, UNAUTHORIZED = 401, PAYMENT_REQUIRED = 402, FORBIDDEN = 403, NOT_FOUND = 404, METHOD_NOT_ALLOWED = 405, NOT_ACCEPTABLE = 406, PROXY_AUTHENTICATION_REQUIRED = 407, REQUEST_TIMEOUT = 408, CONFLICT = 409, GONE = 410, LENGTH_REQUIRED = 411, PRECONDITION_FAILED = 412, REQUEST_ENTITY_TOO_LARGE = 413, REQUEST_URI_TOO_LARGE = 414, UNSUPPORTED_MEDIA_TYPE = 415, REQUESTED_RANGE_NOT_SATISFIABLE = 416, EXPECTATION_FAILED = 417, INTERNAL_SERVER_ERROR = 500, NOT_IMPLEMENTED = 501, BAD_GATEWAY = 502, SERVICE_UNAVAILABLE = 503, GATEWAY_TIMEOUT = 504, HTTP_VERSION_NOT_SUPPORTED = 505, LIFE_IS_GOOD = 1234, CLOSEPIPE = 1235 } |
| enum | http_method_e { HTTP_NONE, HTTP_OPTIONS, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_DELETE, HTTP_TRACE, HTTP_CONNECT, HTTP_RESPONSE, HTTP_NONE, HTTP_OPTIONS, HTTP_GET, HTTP_HEAD, HTTP_POST, HTTP_PUT, HTTP_DELETE, HTTP_TRACE, HTTP_CONNECT, HTTP_RESPONSE } |
| enum | rtmpt_cmd_e { OPEN, SEND, IDLE, CLOSE, OPEN, SEND, IDLE, CLOSE } |
Public Member Functions | |
| HTTP () | |
| ~HTTP () | |
| bool | checkRequestFields (cygnal::Buffer &buf) |
| bool | checkEntityFields (cygnal::Buffer &buf) |
| bool | checkGeneralFields (cygnal::Buffer &buf) |
| std::vector< boost::shared_ptr < cygnal::Element > > | parseEchoRequest (cygnal::Buffer &buf) |
| std::vector< boost::shared_ptr < cygnal::Element > > | parseEchoRequest (boost::uint8_t *buf, size_t size) |
| size_t | getContentLength () |
| boost::uint8_t * | processHeaderFields (cygnal::Buffer *buf) |
| std::string & | getField (const std::string &name) |
| size_t | NumOfFields () |
| void | clearFields () |
| std::map< std::string, std::string > & | getFields () |
| boost::shared_ptr< std::vector < std::string > > | getFieldItem (const std::string &name) |
| boost::shared_ptr < http_response_t > | parseStatus (const std::string &line) |
| boost::shared_ptr< cygnal::Buffer > | formatServerReply (http_status_e code) |
| cygnal::Buffer & | formatGetReply (DiskStream::filetype_e type, size_t size, http_status_e code) |
| cygnal::Buffer & | formatGetReply (size_t size, http_status_e code) |
| cygnal::Buffer & | formatGetReply (http_status_e code) |
| cygnal::Buffer & | formatPostReply (rtmpt_cmd_e code) |
| HTTP & | operator= (HTTP &obj) |
| bool | clearHeader () |
| clear the data in the stored header | |
| bool | startHeader () |
| Start constructing a new HTTP header. As it's hard to predict how much storage to allocate, all of these methods for formatting HTTP header fields store the header while adding data to it. It requires another function to actually send the data. | |
| cygnal::Buffer & | formatCommon (const std::string &data) |
| Format the common header fields that need no other processing. Most of these fields are purely ASCII based, and so chare a common constructor. A few require formatting of numerical data into string data, so they can't use the common form. | |
| cygnal::Buffer & | formatHeader (DiskStream::filetype_e type, size_t filesize, http_status_e code) |
| cygnal::Buffer & | formatHeader (size_t filesize, http_status_e type) |
| cygnal::Buffer & | formatHeader (http_status_e type) |
| cygnal::Buffer & | formatRequest (const std::string &url, http_method_e req) |
| cygnal::Buffer & | formatEchoResponse (const std::string &num, cygnal::Element &el) |
| cygnal::Buffer & | formatEchoResponse (const std::string &num, cygnal::Buffer &data) |
| cygnal::Buffer & | formatEchoResponse (const std::string &num, boost::uint8_t *data, size_t size) |
| cygnal::Buffer & | formatMethod (const std::string &data) |
| cygnal::Buffer & | formatDate () |
| cygnal::Buffer & | formatServer () |
| cygnal::Buffer & | formatServer (const std::string &data) |
| cygnal::Buffer & | formatReferer (const std::string &data) |
| cygnal::Buffer & | formatConnection (const std::string &data) |
| cygnal::Buffer & | formatKeepAlive (const std::string &data) |
| cygnal::Buffer & | formatContentLength () |
| cygnal::Buffer & | formatContentLength (boost::uint32_t filesize) |
| cygnal::Buffer & | formatContentType () |
| cygnal::Buffer & | formatContentType (DiskStream::filetype_e type) |
| cygnal::Buffer & | formatHost (const std::string &data) |
| cygnal::Buffer & | formatAgent (const std::string &data) |
| cygnal::Buffer & | formatAcceptRanges (const std::string &data) |
| cygnal::Buffer & | formatLastModified () |
| cygnal::Buffer & | formatLastModified (const std::string &data) |
| cygnal::Buffer & | formatEtag (const std::string &data) |
| cygnal::Buffer & | formatLanguage (const std::string &data) |
| cygnal::Buffer & | formatCharset (const std::string &data) |
| cygnal::Buffer & | formatEncoding (const std::string &data) |
| cygnal::Buffer & | formatTE (const std::string &data) |
| void | terminateHeader () |
| boost::uint8_t * | getHeader () |
| cygnal::Buffer & | getBuffer () |
| void | dump () |
| int | recvMsg (int fd) |
| Receive a message from the other end of the network connection. | |
| int | recvMsg (int fd, size_t size) |
| size_t | recvChunked (boost::uint8_t *data, size_t size) |
| int | sendMsg () |
| Send a message to the other end of the network connection. | |
| int | sendMsg (int fd) |
| Send a message to the other end of the network connection. ` Sends the contents of the _header and _body private data to the already opened network connection. | |
| int | sendMsg (const boost::uint8_t *data, size_t size) |
| Send a message to the other end of the network connection. ` Sends the contents of the _header and _body private data to the already opened network connection. | |
| int | sendMsg (boost::shared_ptr< cygnal::Buffer > &buf) |
| int | sendMsg (std::stringstream &sstr) |
| bool | keepAlive () |
| void | keepAlive (bool x) |
| int | getMaxRequests () |
| int | getFileSize () |
| std::string & | getFilespec () |
| std::string & | getParams () |
| std::map< int, struct status_codes * > | getStatusCodes () |
| http_version_t * | getVersion () |
| void | setDocRoot (const std::string &path) |
| std::string & | getDocRoot () |
| boost::shared_ptr < cygnal::Buffer > DSOEXPORT | popChunk () |
| boost::shared_ptr < cygnal::Buffer > DSOEXPORT | peekChunk () |
| size_t DSOEXPORT | sizeChunks () |
| boost::shared_ptr < cygnal::Buffer > DSOEXPORT | mergeChunks () |
| http_method_e | getOperation () |
| HTTP () | |
| ~HTTP () | |
| bool | checkRequestFields (cygnal::Buffer &buf) |
| bool | checkEntityFields (cygnal::Buffer &buf) |
| bool | checkGeneralFields (cygnal::Buffer &buf) |
| std::vector< boost::shared_ptr < cygnal::Element > > | parseEchoRequest (cygnal::Buffer &buf) |
| std::vector< boost::shared_ptr < cygnal::Element > > | parseEchoRequest (boost::uint8_t *buf, size_t size) |
| size_t | getContentLength () |
| boost::uint8_t * | processHeaderFields (cygnal::Buffer *buf) |
| std::string & | getField (const std::string &name) |
| size_t | NumOfFields () |
| void | clearFields () |
| std::map< std::string, std::string > & | getFields () |
| boost::shared_ptr< std::vector < std::string > > | getFieldItem (const std::string &name) |
| boost::shared_ptr < http_response_t > | parseStatus (const std::string &line) |
| boost::shared_ptr< cygnal::Buffer > | formatServerReply (http_status_e code) |
| cygnal::Buffer & | formatGetReply (DiskStream::filetype_e type, size_t size, http_status_e code) |
| cygnal::Buffer & | formatGetReply (size_t size, http_status_e code) |
| cygnal::Buffer & | formatGetReply (http_status_e code) |
| cygnal::Buffer & | formatPostReply (rtmpt_cmd_e code) |
| HTTP & | operator= (HTTP &obj) |
| bool | clearHeader () |
| clear the data in the stored header | |
| bool | startHeader () |
| Start constructing a new HTTP header. As it's hard to predict how much storage to allocate, all of these methods for formatting HTTP header fields store the header while adding data to it. It requires another function to actually send the data. | |
| cygnal::Buffer & | formatCommon (const std::string &data) |
| Format the common header fields that need no other processing. Most of these fields are purely ASCII based, and so chare a common constructor. A few require formatting of numerical data into string data, so they can't use the common form. | |
| cygnal::Buffer & | formatHeader (DiskStream::filetype_e type, size_t filesize, http_status_e code) |
| cygnal::Buffer & | formatHeader (size_t filesize, http_status_e type) |
| cygnal::Buffer & | formatHeader (http_status_e type) |
| cygnal::Buffer & | formatRequest (const std::string &url, http_method_e req) |
| cygnal::Buffer & | formatEchoResponse (const std::string &num, cygnal::Element &el) |
| cygnal::Buffer & | formatEchoResponse (const std::string &num, cygnal::Buffer &data) |
| cygnal::Buffer & | formatEchoResponse (const std::string &num, boost::uint8_t *data, size_t size) |
| cygnal::Buffer & | formatMethod (const std::string &data) |
| cygnal::Buffer & | formatDate () |
| cygnal::Buffer & | formatServer () |
| cygnal::Buffer & | formatServer (const std::string &data) |
| cygnal::Buffer & | formatReferer (const std::string &data) |
| cygnal::Buffer & | formatConnection (const std::string &data) |
| cygnal::Buffer & | formatKeepAlive (const std::string &data) |
| cygnal::Buffer & | formatContentLength () |
| cygnal::Buffer & | formatContentLength (boost::uint32_t filesize) |
| cygnal::Buffer & | formatContentType () |
| cygnal::Buffer & | formatContentType (DiskStream::filetype_e type) |
| cygnal::Buffer & | formatHost (const std::string &data) |
| cygnal::Buffer & | formatAgent (const std::string &data) |
| cygnal::Buffer & | formatAcceptRanges (const std::string &data) |
| cygnal::Buffer & | formatLastModified () |
| cygnal::Buffer & | formatLastModified (const std::string &data) |
| cygnal::Buffer & | formatEtag (const std::string &data) |
| cygnal::Buffer & | formatLanguage (const std::string &data) |
| cygnal::Buffer & | formatCharset (const std::string &data) |
| cygnal::Buffer & | formatEncoding (const std::string &data) |
| cygnal::Buffer & | formatTE (const std::string &data) |
| void | terminateHeader () |
| boost::uint8_t * | getHeader () |
| cygnal::Buffer & | getBuffer () |
| void | dump () |
| int | recvMsg (int fd) |
| Receive a message from the other end of the network connection. | |
| int | recvMsg (int fd, size_t size) |
| size_t | recvChunked (boost::uint8_t *data, size_t size) |
| int | sendMsg () |
| Send a message to the other end of the network connection. | |
| int | sendMsg (int fd) |
| int | sendMsg (const boost::uint8_t *data, size_t size) |
| int | sendMsg (boost::shared_ptr< cygnal::Buffer > &buf) |
| int | sendMsg (std::stringstream &sstr) |
| bool | keepAlive () |
| void | keepAlive (bool x) |
| int | getMaxRequests () |
| int | getFileSize () |
| std::string & | getFilespec () |
| std::string & | getParams () |
| std::map< int, struct status_codes * > | getStatusCodes () |
| http_version_t * | getVersion () |
| void | setDocRoot (const std::string &path) |
| std::string & | getDocRoot () |
| boost::shared_ptr < cygnal::Buffer > DSOEXPORT | popChunk () |
| boost::shared_ptr < cygnal::Buffer > DSOEXPORT | peekChunk () |
| size_t DSOEXPORT | sizeChunks () |
| boost::shared_ptr < cygnal::Buffer > DSOEXPORT | mergeChunks () |
| http_method_e | getOperation () |
Protected Types | |
| typedef boost::char_separator < char > | Sep |
| typedef boost::tokenizer< Sep > | Tok |
| typedef boost::char_separator < char > | Sep |
| typedef boost::tokenizer< Sep > | Tok |
Protected Member Functions | |
| http_method_e | extractCommand (boost::uint8_t *data) |
| http_method_e | extractCommand (cygnal::Buffer &data) |
| http_method_e | extractCommand (boost::uint8_t *data) |
| http_method_e | extractCommand (cygnal::Buffer &data) |
Protected Attributes | |
| http_method_e | _cmd |
| cygnal::Buffer | _buffer |
| CQue | _que |
| DiskStream::filetype_e | _filetype |
| std::string | _filespec |
| std::string | _params |
| boost::uint32_t | _filesize |
| std::map< int, struct status_codes * > | _status_codes |
| std::map< std::string, std::string > | _fields |
| http_version_t | _version |
| bool | _keepalive |
| int | _clientid |
| int | _index |
| int | _max_requests |
| std::string | _docroot |
| bool | _close |
typedef boost::char_separator<char> gnash::HTTP::Sep [protected] |
typedef boost::char_separator<char> gnash::HTTP::Sep [protected] |
typedef boost::tokenizer<Sep> gnash::HTTP::Tok [protected] |
typedef boost::tokenizer<Sep> gnash::HTTP::Tok [protected] |
| gnash::HTTP::HTTP | ( | ) |
References _version, gnash::HTTP::http_version_t::major, and gnash::HTTP::http_version_t::minor.
| gnash::HTTP::~HTTP | ( | ) |
| gnash::HTTP::HTTP | ( | ) |
| gnash::HTTP::~HTTP | ( | ) |
| bool gnash::HTTP::checkEntityFields | ( | cygnal::Buffer & | buf | ) |
| bool gnash::HTTP::checkEntityFields | ( | cygnal::Buffer & | buf | ) |
| bool gnash::HTTP::checkGeneralFields | ( | cygnal::Buffer & | buf | ) |
| bool gnash::HTTP::checkGeneralFields | ( | cygnal::Buffer & | buf | ) |
| bool gnash::HTTP::checkRequestFields | ( | cygnal::Buffer & | buf | ) |
| bool gnash::HTTP::checkRequestFields | ( | cygnal::Buffer & | buf | ) |
| void gnash::HTTP::clearFields | ( | ) | [inline] |
References _fields.
| void gnash::HTTP::clearFields | ( | ) | [inline] |
References _fields.
| bool gnash::HTTP::clearHeader | ( | ) |
clear the data in the stored header
References _buffer, _filesize, _max_requests, and cygnal::Buffer::clear().
Referenced by cygnal::HTTPServer::formatGetReply(), formatHeader(), cygnal::HTTPServer::formatPostReply(), cygnal::HTTPServer::processGetRequest(), cygnal::HTTPServer::processPostRequest(), and startHeader().
| bool gnash::HTTP::clearHeader | ( | ) |
clear the data in the stored header
| void gnash::HTTP::dump | ( | ) |
Reimplemented in cygnal::HTTPServer, and cygnal::HTTPServer.
| void gnash::HTTP::dump | ( | ) |
Reimplemented in cygnal::HTTPServer, and cygnal::HTTPServer.
References _, _clientid, _fields, _index, _version, gnash::HTTP::http_version_t::major, and gnash::HTTP::http_version_t::minor.
| HTTP::http_method_e gnash::HTTP::extractCommand | ( | boost::uint8_t * | data | ) | [protected] |
References _params, _version, s2x::end, HTTP_NONE, gnash::HTTP::http_version_t::major, gnash::HTTP::http_version_t::minor, PATH_MAX, and start.
Referenced by cygnal::HTTPServer::processClientRequest(), and processHeaderFields().
| http_method_e gnash::HTTP::extractCommand | ( | cygnal::Buffer & | data | ) | [inline, protected] |
| http_method_e gnash::HTTP::extractCommand | ( | boost::uint8_t * | data | ) | [protected] |
| http_method_e gnash::HTTP::extractCommand | ( | cygnal::Buffer & | data | ) | [inline, protected] |
| cygnal::Buffer& gnash::HTTP::formatAcceptRanges | ( | const std::string & | data | ) | [inline] |
Referenced by formatHeader().
| cygnal::Buffer& gnash::HTTP::formatAcceptRanges | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatAgent | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatAgent | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatCharset | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatCharset | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatCommon | ( | const std::string & | data | ) |
Format the common header fields that need no other processing. Most of these fields are purely ASCII based, and so chare a common constructor. A few require formatting of numerical data into string data, so they can't use the common form.
| cygnal::Buffer& gnash::HTTP::formatCommon | ( | const std::string & | data | ) |
Format the common header fields that need no other processing. Most of these fields are purely ASCII based, and so chare a common constructor. A few require formatting of numerical data into string data, so they can't use the common form.
| cygnal::Buffer& gnash::HTTP::formatConnection | ( | const std::string & | data | ) | [inline] |
Referenced by cygnal::HTTPServer::formatErrorResponse(), and formatHeader().
| cygnal::Buffer& gnash::HTTP::formatConnection | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer & gnash::HTTP::formatContentLength | ( | ) |
References _filesize.
Referenced by formatEchoResponse(), cygnal::GatewayTest::formatEchoResponse(), cygnal::HTTPServer::formatErrorResponse(), and formatHeader().
| cygnal::Buffer & gnash::HTTP::formatContentLength | ( | boost::uint32_t | filesize | ) |
References _buffer.
| cygnal::Buffer& gnash::HTTP::formatContentLength | ( | ) |
| cygnal::Buffer& gnash::HTTP::formatContentLength | ( | boost::uint32_t | filesize | ) |
| cygnal::Buffer & gnash::HTTP::formatContentType | ( | ) |
| cygnal::Buffer & gnash::HTTP::formatContentType | ( | DiskStream::filetype_e | type | ) |
References _buffer, gnash::DiskStream::FILETYPE_AMF, gnash::DiskStream::FILETYPE_DIRAC, gnash::DiskStream::FILETYPE_FLAC, gnash::DiskStream::FILETYPE_FLV, gnash::DiskStream::FILETYPE_GIF, gnash::DiskStream::FILETYPE_HTML, gnash::DiskStream::FILETYPE_JPEG, gnash::DiskStream::FILETYPE_MP3, gnash::DiskStream::FILETYPE_MP4, gnash::DiskStream::FILETYPE_NONE, gnash::DiskStream::FILETYPE_OGG, gnash::DiskStream::FILETYPE_PHP, gnash::DiskStream::FILETYPE_PNG, gnash::DiskStream::FILETYPE_SWF, gnash::DiskStream::FILETYPE_TEXT, gnash::DiskStream::FILETYPE_THEORA, gnash::DiskStream::FILETYPE_VORBIS, gnash::DiskStream::FILETYPE_VP6, and gnash::DiskStream::FILETYPE_XML.
| cygnal::Buffer& gnash::HTTP::formatContentType | ( | ) |
| cygnal::Buffer& gnash::HTTP::formatContentType | ( | DiskStream::filetype_e | type | ) |
| cygnal::Buffer& gnash::HTTP::formatDate | ( | ) |
| cygnal::Buffer & gnash::HTTP::formatDate | ( | ) |
References _buffer, and s2x::d.
Referenced by cygnal::HTTPServer::formatErrorResponse(), formatHeader(), and cygnal::HTTPServer::formatPostReply().
| cygnal::Buffer& gnash::HTTP::formatEchoResponse | ( | const std::string & | num, | |
| cygnal::Element & | el | |||
| ) |
Referenced by formatEchoResponse(), and cygnal::HTTPServer::processPostRequest().
| cygnal::Buffer& gnash::HTTP::formatEchoResponse | ( | const std::string & | num, | |
| cygnal::Element & | el | |||
| ) |
| cygnal::Buffer& gnash::HTTP::formatEchoResponse | ( | const std::string & | num, | |
| cygnal::Buffer & | data | |||
| ) |
| cygnal::Buffer& gnash::HTTP::formatEchoResponse | ( | const std::string & | num, | |
| boost::uint8_t * | data, | |||
| size_t | size | |||
| ) |
Reimplemented in cygnal::GatewayTest, and cygnal::GatewayTest.
| cygnal::Buffer & gnash::HTTP::formatEchoResponse | ( | const std::string & | num, | |
| boost::uint8_t * | data, | |||
| size_t | size | |||
| ) |
Reimplemented in cygnal::GatewayTest, and cygnal::GatewayTest.
References _buffer, cygnal::Buffer::append(), cygnal::AMF::encodeString(), gnash::DiskStream::FILETYPE_AMF, formatContentLength(), formatContentType(), formatServer(), terminateHeader(), cygnal::Element::UNDEFINED_AMF0, and cygnal::Element::UNSUPPORTED_AMF0.
| cygnal::Buffer & gnash::HTTP::formatEchoResponse | ( | const std::string & | num, | |
| cygnal::Buffer & | data | |||
| ) |
References cygnal::Buffer::allocated(), formatEchoResponse(), and cygnal::Buffer::reference().
| cygnal::Buffer& gnash::HTTP::formatEncoding | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatEncoding | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatEtag | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatEtag | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatGetReply | ( | size_t | size, | |
| http_status_e | code | |||
| ) |
Reimplemented in cygnal::HTTPServer, and cygnal::HTTPServer.
| cygnal::Buffer& gnash::HTTP::formatGetReply | ( | http_status_e | code | ) |
Reimplemented in cygnal::HTTPServer, and cygnal::HTTPServer.
| cygnal::Buffer& gnash::HTTP::formatGetReply | ( | DiskStream::filetype_e | type, | |
| size_t | size, | |||
| http_status_e | code | |||
| ) |
Reimplemented in cygnal::HTTPServer, and cygnal::HTTPServer.
| cygnal::Buffer& gnash::HTTP::formatGetReply | ( | size_t | size, | |
| http_status_e | code | |||
| ) |
Reimplemented in cygnal::HTTPServer, and cygnal::HTTPServer.
| cygnal::Buffer& gnash::HTTP::formatGetReply | ( | http_status_e | code | ) |
Reimplemented in cygnal::HTTPServer, and cygnal::HTTPServer.
| cygnal::Buffer& gnash::HTTP::formatGetReply | ( | DiskStream::filetype_e | type, | |
| size_t | size, | |||
| http_status_e | code | |||
| ) |
Reimplemented in cygnal::HTTPServer, and cygnal::HTTPServer.
| cygnal::Buffer & gnash::HTTP::formatHeader | ( | DiskStream::filetype_e | type, | |
| size_t | filesize, | |||
| http_status_e | code | |||
| ) |
References _buffer, _close, _keepalive, _version, ACCEPTED, BAD_GATEWAY, BAD_REQUEST, clearHeader(), CLOSEPIPE, CONFLICT, CONTINUE, CREATED, EXPECTATION_FAILED, FORBIDDEN, formatAcceptRanges(), formatConnection(), formatContentLength(), formatContentType(), formatDate(), formatLastModified(), formatServer(), FOUND, GATEWAY_TIMEOUT, GONE, HTTP_VERSION_NOT_SUPPORTED, INTERNAL_SERVER_ERROR, LENGTH_REQUIRED, LIFE_IS_GOOD, gnash::HTTP::http_version_t::major, METHOD_NOT_ALLOWED, gnash::HTTP::http_version_t::minor, MOVED_PERMANENTLY, MULTIPLE_CHOICES, NO_CONTENT, NON_AUTHORITATIVE, NOT_ACCEPTABLE, NOT_FOUND, NOT_IMPLEMENTED, NOT_MODIFIED, OK, PARTIAL_CONTENT, PAYMENT_REQUIRED, PRECONDITION_FAILED, PROXY_AUTHENTICATION_REQUIRED, REQUEST_ENTITY_TOO_LARGE, REQUEST_TIMEOUT, REQUEST_URI_TOO_LARGE, REQUESTED_RANGE_NOT_SATISFIABLE, RESET_CONTENT, SEE_OTHER, SERVICE_UNAVAILABLE, SWITCHPROTOCOLS, TEMPORARY_REDIRECT, terminateHeader(), UNAUTHORIZED, UNSUPPORTED_MEDIA_TYPE, and USE_PROXY.
Referenced by cygnal::HTTPServer::formatGetReply(), formatHeader(), cygnal::HTTPServer::formatPostReply(), cygnal::HTTPServer::processGetRequest(), and cygnal::HTTPServer::processPostRequest().
| cygnal::Buffer & gnash::HTTP::formatHeader | ( | http_status_e | type | ) |
References _filesize, and formatHeader().
| cygnal::Buffer& gnash::HTTP::formatHeader | ( | DiskStream::filetype_e | type, | |
| size_t | filesize, | |||
| http_status_e | code | |||
| ) |
| cygnal::Buffer& gnash::HTTP::formatHeader | ( | size_t | filesize, | |
| http_status_e | type | |||
| ) |
| cygnal::Buffer& gnash::HTTP::formatHeader | ( | http_status_e | type | ) |
| cygnal::Buffer & gnash::HTTP::formatHeader | ( | size_t | filesize, | |
| http_status_e | type | |||
| ) |
References _filetype, and formatHeader().
| cygnal::Buffer& gnash::HTTP::formatHost | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatHost | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatKeepAlive | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatKeepAlive | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatLanguage | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatLanguage | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer & gnash::HTTP::formatLastModified | ( | ) |
References s2x::d.
Referenced by formatHeader().
| cygnal::Buffer& gnash::HTTP::formatLastModified | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatLastModified | ( | ) |
| cygnal::Buffer& gnash::HTTP::formatLastModified | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatMethod | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatMethod | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatPostReply | ( | rtmpt_cmd_e | code | ) |
Reimplemented in cygnal::HTTPServer, and cygnal::HTTPServer.
| cygnal::Buffer& gnash::HTTP::formatPostReply | ( | rtmpt_cmd_e | code | ) |
Reimplemented in cygnal::HTTPServer, and cygnal::HTTPServer.
| cygnal::Buffer& gnash::HTTP::formatReferer | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatReferer | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatRequest | ( | const std::string & | url, | |
| http_method_e | req | |||
| ) |
| cygnal::Buffer& gnash::HTTP::formatRequest | ( | const std::string & | url, | |
| http_method_e | req | |||
| ) |
| cygnal::Buffer & gnash::HTTP::formatServer | ( | ) |
References _buffer.
Referenced by formatEchoResponse(), cygnal::GatewayTest::formatEchoResponse(), cygnal::HTTPServer::formatErrorResponse(), formatHeader(), and cygnal::HTTPServer::formatPostReply().
| cygnal::Buffer& gnash::HTTP::formatServer | ( | const std::string & | data | ) |
| cygnal::Buffer& gnash::HTTP::formatServer | ( | ) |
| cygnal::Buffer& gnash::HTTP::formatServer | ( | const std::string & | data | ) |
| boost::shared_ptr<cygnal::Buffer> gnash::HTTP::formatServerReply | ( | http_status_e | code | ) |
Reimplemented in cygnal::HTTPServer, and cygnal::HTTPServer.
| boost::shared_ptr<cygnal::Buffer> gnash::HTTP::formatServerReply | ( | http_status_e | code | ) |
Reimplemented in cygnal::HTTPServer, and cygnal::HTTPServer.
| cygnal::Buffer& gnash::HTTP::formatTE | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::formatTE | ( | const std::string & | data | ) | [inline] |
| cygnal::Buffer& gnash::HTTP::getBuffer | ( | ) | [inline] |
References _buffer.
| cygnal::Buffer& gnash::HTTP::getBuffer | ( | ) | [inline] |
References _buffer.
| size_t gnash::HTTP::getContentLength | ( | ) |
References getField().
| size_t gnash::HTTP::getContentLength | ( | ) |
| std::string& gnash::HTTP::getDocRoot | ( | ) | [inline] |
| std::string& gnash::HTTP::getDocRoot | ( | ) | [inline] |
| std::string& gnash::HTTP::getField | ( | const std::string & | name | ) | [inline] |
| std::string& gnash::HTTP::getField | ( | const std::string & | name | ) | [inline] |
References _fields.
| boost::shared_ptr<std::vector<std::string> > gnash::HTTP::getFieldItem | ( | const std::string & | name | ) |
| boost::shared_ptr< std::vector< std::string > > gnash::HTTP::getFieldItem | ( | const std::string & | name | ) |
References _fields, gnash::key::e, gnash::key::i, and gnash::key::t.
| std::map<std::string, std::string>& gnash::HTTP::getFields | ( | ) | [inline] |
References _fields.
| std::map<std::string, std::string>& gnash::HTTP::getFields | ( | ) | [inline] |
References _fields.
| int gnash::HTTP::getFileSize | ( | ) | [inline] |
| int gnash::HTTP::getFileSize | ( | ) | [inline] |
| std::string& gnash::HTTP::getFilespec | ( | ) | [inline] |
Referenced by connection_handler(), cygnal::HTTPServer::http_handler(), and cygnal::Handler::parseFirstRequest().
| std::string& gnash::HTTP::getFilespec | ( | ) | [inline] |
| boost::uint8_t* gnash::HTTP::getHeader | ( | ) | [inline] |
References _buffer.
| boost::uint8_t* gnash::HTTP::getHeader | ( | ) | [inline] |
References _buffer.
| int gnash::HTTP::getMaxRequests | ( | ) | [inline] |
| int gnash::HTTP::getMaxRequests | ( | ) | [inline] |
| http_method_e gnash::HTTP::getOperation | ( | ) | [inline] |
| http_method_e gnash::HTTP::getOperation | ( | ) | [inline] |
| std::string& gnash::HTTP::getParams | ( | ) | [inline] |
| std::string& gnash::HTTP::getParams | ( | ) | [inline] |
| std::map<int, struct status_codes *> gnash::HTTP::getStatusCodes | ( | ) | [inline] |
| std::map<int, struct status_codes *> gnash::HTTP::getStatusCodes | ( | ) | [inline] |
| http_version_t* gnash::HTTP::getVersion | ( | ) | [inline] |
References _version.
| http_version_t* gnash::HTTP::getVersion | ( | ) | [inline] |
References _version.
| bool gnash::HTTP::keepAlive | ( | ) | [inline] |
| void gnash::HTTP::keepAlive | ( | bool | x | ) | [inline] |
| bool gnash::HTTP::keepAlive | ( | ) | [inline] |
Referenced by cygnal::HTTPServer::http_handler().
| void gnash::HTTP::keepAlive | ( | bool | x | ) | [inline] |
| boost::shared_ptr<cygnal::Buffer> DSOEXPORT gnash::HTTP::mergeChunks | ( | ) | [inline] |
| boost::shared_ptr<cygnal::Buffer> DSOEXPORT gnash::HTTP::mergeChunks | ( | ) | [inline] |
| size_t gnash::HTTP::NumOfFields | ( | ) | [inline] |
References _fields.
| size_t gnash::HTTP::NumOfFields | ( | ) | [inline] |
References _fields.
| std::vector<boost::shared_ptr<cygnal::Element > > gnash::HTTP::parseEchoRequest | ( | cygnal::Buffer & | buf | ) | [inline] |
References parseEchoRequest(), cygnal::Buffer::reference(), and cygnal::Buffer::size().
Referenced by parseEchoRequest().
| std::vector<boost::shared_ptr<cygnal::Element > > gnash::HTTP::parseEchoRequest | ( | cygnal::Buffer & | buf | ) | [inline] |
References parseEchoRequest(), cygnal::Buffer::reference(), and cygnal::Buffer::size().
Referenced by parseEchoRequest(), and cygnal::HTTPServer::processPostRequest().
| std::vector<boost::shared_ptr<cygnal::Element > > gnash::HTTP::parseEchoRequest | ( | boost::uint8_t * | buf, | |
| size_t | size | |||
| ) |
Reimplemented in cygnal::GatewayTest, and cygnal::GatewayTest.
| std::vector<boost::shared_ptr<cygnal::Element > > gnash::HTTP::parseEchoRequest | ( | boost::uint8_t * | buf, | |
| size_t | size | |||
| ) |
Reimplemented in cygnal::GatewayTest, and cygnal::GatewayTest.
| boost::shared_ptr<http_response_t> gnash::HTTP::parseStatus | ( | const std::string & | line | ) |
| boost::shared_ptr<http_response_t> gnash::HTTP::parseStatus | ( | const std::string & | line | ) |
| boost::shared_ptr<cygnal::Buffer> DSOEXPORT gnash::HTTP::peekChunk | ( | ) | [inline] |
| boost::shared_ptr<cygnal::Buffer> DSOEXPORT gnash::HTTP::peekChunk | ( | ) | [inline] |
Referenced by connection_handler().
| boost::shared_ptr<cygnal::Buffer> DSOEXPORT gnash::HTTP::popChunk | ( | ) | [inline] |
| boost::shared_ptr<cygnal::Buffer> DSOEXPORT gnash::HTTP::popChunk | ( | ) | [inline] |
| boost::uint8_t * gnash::HTTP::processHeaderFields | ( | cygnal::Buffer * | buf | ) |
References _fields, _filesize, _filespec, _filetype, _keepalive, _max_requests, _params, _version, s2x::end, extractCommand(), gnash::key::i, gnash::HTTP::http_version_t::major, gnash::HTTP::http_version_t::minor, name, cygnal::Buffer::reference(), cygnal::Buffer::size(), start, and gnash::key::t.
Referenced by connection_handler(), cygnal::Handler::parseFirstRequest(), cygnal::HTTPServer::processGetRequest(), and cygnal::HTTPServer::processPostRequest().
| boost::uint8_t* gnash::HTTP::processHeaderFields | ( | cygnal::Buffer * | buf | ) |
| size_t gnash::HTTP::recvChunked | ( | boost::uint8_t * | data, | |
| size_t | size | |||
| ) |
| size_t gnash::HTTP::recvChunked | ( | boost::uint8_t * | data, | |
| size_t | size | |||
| ) |
| int gnash::HTTP::recvMsg | ( | int | fd, | |
| size_t | size | |||
| ) |
References _que, cygnal::NETBUFSIZE, gnash::CQue::push(), and gnash::Network::readNet().
| int gnash::HTTP::recvMsg | ( | int | fd, | |
| size_t | size | |||
| ) |
| int gnash::HTTP::recvMsg | ( | int | fd | ) |
Receive a message from the other end of the network connection.
| fd | The file descriptor to read from |
Referenced by cygnal::HTTPServer::http_handler().
| int gnash::HTTP::recvMsg | ( | int | fd | ) |
Receive a message from the other end of the network connection.
| fd | The file descriptor to read from |
| int DSOEXPORT gnash::HTTP::sendMsg | ( | int | fd | ) |
Send a message to the other end of the network connection. ` Sends the contents of the _header and _body private data to the already opened network connection.
| fd | The file descriptor to use for writing to the network. |
| int gnash::HTTP::sendMsg | ( | boost::shared_ptr< cygnal::Buffer > & | buf | ) | [inline] |
| int gnash::HTTP::sendMsg | ( | boost::shared_ptr< cygnal::Buffer > & | buf | ) | [inline] |
| int gnash::HTTP::sendMsg | ( | const boost::uint8_t * | data, | |
| size_t | size | |||
| ) |
| int gnash::HTTP::sendMsg | ( | ) |
Send a message to the other end of the network connection.
| data | A real pointer to the data. | |
| size | The number of bytes of data stored. | |
| buf | A smart pointer to a Buffer class. | |
| sstr | A smart pointer to a Buffer class. | |
| fd | The file descriptor to use for writing to the network. | |
| void | Send the contents of the _header and _body. |
| int DSOEXPORT gnash::HTTP::sendMsg | ( | const boost::uint8_t * | data, | |
| size_t | size | |||
| ) |
Send a message to the other end of the network connection. ` Sends the contents of the _header and _body private data to the already opened network connection.
| data | A real pointer to the data. | |
| size | The number of bytes of data stored. |
References gnash::Network::writeNet().
| int gnash::HTTP::sendMsg | ( | int | fd | ) |
| int gnash::HTTP::sendMsg | ( | std::stringstream & | sstr | ) | [inline] |
| int gnash::HTTP::sendMsg | ( | std::stringstream & | sstr | ) | [inline] |
| int DSOEXPORT gnash::HTTP::sendMsg | ( | ) |
Send a message to the other end of the network connection.
Send a message to the other end of the network connection. ` Sends the contents of the _header and _body private data to the already opened network connection.
| data | A real pointer to the data. | |
| size | The number of bytes of data stored. | |
| buf | A smart pointer to a Buffer class. | |
| sstr | A smart pointer to a Buffer class. | |
| fd | The file descriptor to use for writing to the network. | |
| void | Send the contents of the _header and _body. |
| void gnash::HTTP::setDocRoot | ( | const std::string & | path | ) | [inline] |
| void gnash::HTTP::setDocRoot | ( | const std::string & | path | ) | [inline] |
Referenced by connection_handler().
| size_t DSOEXPORT gnash::HTTP::sizeChunks | ( | ) | [inline] |
| size_t DSOEXPORT gnash::HTTP::sizeChunks | ( | ) | [inline] |
| bool gnash::HTTP::startHeader | ( | ) |
| bool gnash::HTTP::startHeader | ( | ) |
Start constructing a new HTTP header. As it's hard to predict how much storage to allocate, all of these methods for formatting HTTP header fields store the header while adding data to it. It requires another function to actually send the data.
References clearHeader().
| void gnash::HTTP::terminateHeader | ( | ) | [inline] |
References _buffer.
| void gnash::HTTP::terminateHeader | ( | ) | [inline] |
References _buffer.
Referenced by formatEchoResponse(), cygnal::GatewayTest::formatEchoResponse(), cygnal::HTTPServer::formatErrorResponse(), formatHeader(), and cygnal::HTTPServer::formatPostReply().
cygnal::Buffer gnash::HTTP::_buffer [protected] |
Referenced by clearHeader(), formatContentLength(), formatContentType(), formatDate(), formatEchoResponse(), cygnal::GatewayTest::formatEchoResponse(), cygnal::HTTPServer::formatErrorResponse(), cygnal::HTTPServer::formatGetReply(), formatHeader(), cygnal::HTTPServer::formatPostReply(), and formatServer().
int gnash::HTTP::_clientid [protected] |
Referenced by dump().
bool gnash::HTTP::_close [protected] |
Referenced by formatHeader().
http_method_e gnash::HTTP::_cmd [protected] |
Referenced by cygnal::HTTPServer::processClientRequest().
std::string gnash::HTTP::_docroot [protected] |
std::map< std::string, std::string > gnash::HTTP::_fields [protected] |
Referenced by dump(), getFieldItem(), and processHeaderFields().
boost::uint32_t gnash::HTTP::_filesize [protected] |
std::string gnash::HTTP::_filespec [protected] |
DiskStream::filetype_e gnash::HTTP::_filetype [protected] |
int gnash::HTTP::_index [protected] |
Referenced by dump(), and cygnal::HTTPServer::extractRTMPT().
bool gnash::HTTP::_keepalive [protected] |
Referenced by formatHeader(), and processHeaderFields().
int gnash::HTTP::_max_requests [protected] |
Referenced by clearHeader(), and processHeaderFields().
std::string gnash::HTTP::_params [protected] |
Referenced by extractCommand(), and processHeaderFields().
CQue gnash::HTTP::_que [protected] |
Referenced by cygnal::HTTPServer::processPostRequest(), recvChunked(), and recvMsg().
std::map< int, struct status_codes * > gnash::HTTP::_status_codes [protected] |
http_version_t gnash::HTTP::_version [protected] |
Referenced by dump(), extractCommand(), formatHeader(), HTTP(), and processHeaderFields().
1.7.1