#include <httphead.h>
Public Types | |
| typedef std::map< std::string, std::string > | header_map |
| Type of data member that contains headers (except cookies). | |
| typedef header_map::iterator | iterator |
| Iterator type that allows access to header strings (except cookies). | |
| typedef header_map::const_iterator | const_iterator |
| Const Iterator type that allows access to header strings (except cookies). | |
Public Member Functions | |
| HttpHeader (const std::string &content="text/plain", bool debug=false) | |
| Constructor. | |
| bool | debug () const |
| const_iterator | begin () const |
| const_iterator | end () const |
| iterator | begin () |
| iterator | end () |
| size_t | size () const |
| HttpHeader & | nocache () |
| Add header strings that prevent browser from caching the page. | |
| HttpHeader & | cookie (const std::string &name, const std::string &value="", const std::string &path="/") |
| Set cookie name = value for path. | |
| HttpHeader & | content_type (const std::string &value) |
| Add header strings to set content type. | |
| HttpHeader & | location (const std::string &value) |
| Add header string to redirect browser to a given url. | |
| HttpHeader & | refresh (size_t duration=0, const std::string &url="") |
| Add header string to refresh browser. | |
| HttpHeader & | add (const std::string &name, const std::string &value) |
| General header add function. | |
| HttpHeader & | erase (const std::string &name) |
| Remove any header with a given name. | |
| HttpHeader & | clear () |
| Remove all header strings. | |
Private Types | |
| typedef std::map< std::string, std::pair< std::string, std::string > > | cookie_map |
Private Attributes | |
| bool | debug_ |
| header_map | headers_ |
| cookie_map | cookies_ |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const HttpHeader &header) |
| Output header strings and cookie definitions. | |
The class makes it convenient to set up standard headers and cookies for the response:
Definition at line 27 of file httphead.h.
|
|
Type of data member that contains headers (except cookies).
Definition at line 35 of file httphead.h. |
|
|
Iterator type that allows access to header strings (except cookies).
Definition at line 38 of file httphead.h. |
|
|
Const Iterator type that allows access to header strings (except cookies).
Definition at line 41 of file httphead.h. |
|
|
Definition at line 118 of file httphead.h. |
|
||||||||||||
|
Constructor.
|
|
|
Definition at line 44 of file httphead.h. References debug_. |
|
|
Definition at line 46 of file httphead.h. References headers_. |
|
|
Definition at line 48 of file httphead.h. References headers_. |
|
|
Definition at line 50 of file httphead.h. References headers_. |
|
|
Definition at line 52 of file httphead.h. References headers_. |
|
|
Definition at line 54 of file httphead.h. References headers_. |
|
|
Add header strings that prevent browser from caching the page.
|
|
||||||||||||||||
|
Set cookie name = value for path. Providing an empty value will remove the cookie.
|
|
|
Add header strings to set content type.
|
|
|
Add header string to redirect browser to a given url.
|
|
||||||||||||
|
Add header string to refresh browser.
|
|
||||||||||||
|
General header add function.
|
|
|
Remove any header with a given name.
|
|
|
Remove all header strings.
Definition at line 107 of file httphead.h. References headers_. |
|
||||||||||||
|
Output header strings and cookie definitions.
|
|
|
Definition at line 116 of file httphead.h. Referenced by debug(). |
|
|
Definition at line 117 of file httphead.h. |
|
|
Definition at line 119 of file httphead.h. |
| dvcgi-0.5.14 | [22 January, 2006] |