LeftHookRoll
An HTTP/1.0 compliant web server, as specified by RFC1945
Loading...
Searching...
No Matches
Request.hpp File Reference

Parses and stores the entire HTTP request entity (headers, body). Utilizes a State Machine to handle non-blocking, fragmented data streams. More...

#include <string>
#include <map>
#include <sys/types.h>
#include <netinet/in.h>
#include "AllowedMethods.hpp"
#include "DataStore.hpp"
Include dependency graph for Request.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Request
 

Namespaces

namespace  req_utils
 

Macros

#define PARSE_BYTE_SLICE   8192
 

Enumerations

enum  ReqState {
  REQ_HEADERS , REQ_BODY , REQ_CHUNKED , REQ_DONE ,
  REQ_ERROR
}
 Represents the current network-reading phase of the HTTP request. More...
 

Functions

std::string req_utils::trim (const std::string &s)
 
std::string req_utils::ipv4ToString (const struct ::sockaddr_in &addr)
 

Detailed Description

Parses and stores the entire HTTP request entity (headers, body). Utilizes a State Machine to handle non-blocking, fragmented data streams.

Definition in file Request.hpp.

Macro Definition Documentation

◆ PARSE_BYTE_SLICE

#define PARSE_BYTE_SLICE   8192

Definition at line 16 of file Request.hpp.

Enumeration Type Documentation

◆ ReqState

enum ReqState

Represents the current network-reading phase of the HTTP request.

Enumerator
REQ_HEADERS 
REQ_BODY 
REQ_CHUNKED 
REQ_DONE 
REQ_ERROR 

Definition at line 26 of file Request.hpp.