#include <header.h>
Public Member Functions | |
header () | |
~header () | |
void | setlength (unsigned length) |
Set Content-length header. | |
void | settype (const std::string &contenttype) |
Set Content-type header. | |
bool | setexpire (const std::string &expire) |
Set Expire header. | |
void | setstatus (unsigned status, const std::string &description="") |
Set Status Code. | |
void | override (const std::string &httpversion="HTTP/1.0") |
Override the web server's parsing of headers. | |
void | setheader (const std::string &id, const std::string &value) |
Set a generic header. | |
void | redirect (const std::string &location) |
Create a redirect header. | |
void | addcookie (cookie &value) |
Add a cookie object to the header. | |
std::string | get () const |
Get the formatted header string. |
400 OK Content-type: text/html
will be generated. The get method returns the header string.
|
Construct a header object. |
|
Destroy *this header object. |
|
Add a cookie object to the header. Add a cookie to the header.
|
|
Get the formatted header string. Get the formatted CGI HTTP header to send to the client. The default header will be 400 OK Content-type: text/html unless modified by other header methods. The web server may modify or expand on these headers unless a specific status code has been specified (e.g. through redirect method).
|
|
Override the web server's parsing of headers. Set the HTTP version string, overriding the web servers processing of the HTTP headers returned by this program.
|
|
Create a redirect header. Create a redirect header.
|
|
Set Expire header. Set the expiration date for the document.
|
|
Set a generic header. Set a user-defined HTTP header.
|
|
Set Content-length header. Set the content length to be sent to the client.
|
|
Set Status Code. Set the status code to be returned to the client. Manually setting the status code will override the web server's ability to alter HTTP headers.
|
|
Set Content-type header. Set the mime type of the content to be sent to the client. This is only required if content other than HTML is being returned. Format: type/sub-type
|