diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2015-06-25 02:14:18 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2015-06-25 02:14:18 +0200 |
| commit | 85adf26a787b33d69d07df0dc786516fed800e21 (patch) | |
| tree | 12de4b0cae3999f3da7bbf3d21c631eecf6bf4a3 /src/cgi.cc | |
| parent | 0c55606145b6c5d9a303b19b3dba4996ec3ed3a9 (diff) | |
Add basic auth support
Diffstat (limited to 'src/cgi.cc')
| -rw-r--r-- | src/cgi.cc | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -63,6 +63,21 @@ public: return path ? path : ""; } + std::string request_uri() override { + auto path = getparam("REQUEST_URI"); + return path ? path : ""; + } + + std::string remote_addr() override { + auto path = getparam("REMOTE_ADDR"); + return path ? path : ""; + } + + std::string http_auth() override { + auto auth = getparam("HTTP_AUTHORIZATION"); + return auth ? auth : ""; + } + std::string content_type() override { auto ct = getparam("CONTENT_TYPE"); if (!ct) return ""; |
