summaryrefslogtreecommitdiffabout
path: root/src/cgi_interface.cc
Side-by-side diff
Diffstat (limited to 'src/cgi_interface.cc') (more/less context) (show whitespace changes)
-rw-r--r--src/cgi_interface.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/cgi_interface.cc b/src/cgi_interface.cc
new file mode 100644
index 0000000..ffbd2bf
--- a/dev/null
+++ b/src/cgi_interface.cc
@@ -0,0 +1,16 @@
+#include "kingate/cgi_interface.h"
+#include "kingate/exception.h"
+
+namespace kingate {
+
+ bool cgi_interface::has_meta(const string& n) const {
+ return metavars.find(n) != metavars.end();
+ }
+ const string& cgi_interface::get_meta(const string& n) const {
+ metavars_t::const_iterator rv = metavars.find(n);
+ if(rv == metavars.end())
+ throw exception_notfound(CODEPOINT,"no such meta-variable");
+ return rv->second;
+ }
+
+}