|
LeftHookRoll
An HTTP/1.0 compliant web server, as specified by RFC1945
|
A lightweight wrapper for a short bitmap to handle HTTP method validations securely. More...
#include <AllowedMethods.hpp>
Public Member Functions | |
| AllowedMethods () | |
| AllowedMethods (const AllowedMethods &other) | |
| AllowedMethods & | operator= (const AllowedMethods &other) |
| ~AllowedMethods () | |
| void | addMethod (HTTPMethod method) |
| Adds an HTTP method to the allowed bitmap using bitwise OR. | |
| void | removeMethod (HTTPMethod method) |
| Removes an HTTP method from the allowed bitmap using bitwise AND NOT. | |
| bool | isAllowed (HTTPMethod method) const |
| Checks if a specific HTTP method is permitted using bitwise AND. | |
| void | clear () |
| Clears all methods (resets to 0 / UNKNOWN_METHOD). | |
| short | getBitmap () const |
| Returns the raw bitmap. | |
Static Public Member Functions | |
| static HTTPMethod | stringToMethod (const std::string &methodStr) |
| Converts a string representation of an HTTP method to its enum value. | |
| static std::string | methodToString (HTTPMethod method) |
Private Attributes | |
| short | _bitmap |
A lightweight wrapper for a short bitmap to handle HTTP method validations securely.
Definition at line 29 of file AllowedMethods.hpp.
| AllowedMethods::AllowedMethods | ( | ) |
Definition at line 3 of file AllowedMethods.cpp.
| AllowedMethods::AllowedMethods | ( | const AllowedMethods & | other | ) |
Definition at line 5 of file AllowedMethods.cpp.
| AllowedMethods::~AllowedMethods | ( | ) |
Definition at line 14 of file AllowedMethods.cpp.
| AllowedMethods & AllowedMethods::operator= | ( | const AllowedMethods & | other | ) |
Definition at line 7 of file AllowedMethods.cpp.
| void AllowedMethods::addMethod | ( | HTTPMethod | method | ) |
Adds an HTTP method to the allowed bitmap using bitwise OR.
Definition at line 18 of file AllowedMethods.cpp.
| void AllowedMethods::removeMethod | ( | HTTPMethod | method | ) |
Removes an HTTP method from the allowed bitmap using bitwise AND NOT.
Definition at line 23 of file AllowedMethods.cpp.
| bool AllowedMethods::isAllowed | ( | HTTPMethod | method | ) | const |
Checks if a specific HTTP method is permitted using bitwise AND.
Definition at line 28 of file AllowedMethods.cpp.
| void AllowedMethods::clear | ( | ) |
Clears all methods (resets to 0 / UNKNOWN_METHOD).
Definition at line 33 of file AllowedMethods.cpp.
| short AllowedMethods::getBitmap | ( | ) | const |
Returns the raw bitmap.
Definition at line 38 of file AllowedMethods.cpp.
|
static |
Converts a string representation of an HTTP method to its enum value.
Definition at line 43 of file AllowedMethods.cpp.
|
static |
Definition at line 55 of file AllowedMethods.cpp.
|
private |
Definition at line 71 of file AllowedMethods.hpp.