author | Michael Krelin <hacker@klever.net> | 2005-01-29 20:14:37 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2005-01-29 20:14:37 (UTC) |
commit | ff4b919683537625f693eedf53006364d0f8444d (patch) (unidiff) | |
tree | 4c19e38c0832b16b4ca98ae5af6542d932373eb1 /src/cgi_interface.cc | |
parent | f9a64a67c89a7566e63ed66c3a69c359abea4dfd (diff) | |
download | kingate-0.0.zip kingate-0.0.tar.gz kingate-0.0.tar.bz2 |
initial commit into repository0.0
-rw-r--r-- | src/cgi_interface.cc | 16 |
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 @@ | |||
1 | #include "kingate/cgi_interface.h" | ||
2 | #include "kingate/exception.h" | ||
3 | |||
4 | namespace kingate { | ||
5 | |||
6 | bool cgi_interface::has_meta(const string& n) const { | ||
7 | return metavars.find(n) != metavars.end(); | ||
8 | } | ||
9 | const string& cgi_interface::get_meta(const string& n) const { | ||
10 | metavars_t::const_iterator rv = metavars.find(n); | ||
11 | if(rv == metavars.end()) | ||
12 | throw exception_notfound(CODEPOINT,"no such meta-variable"); | ||
13 | return rv->second; | ||
14 | } | ||
15 | |||
16 | } | ||