summaryrefslogtreecommitdiffabout
path: root/src/cgi_interface.cc
blob: af5c0200c7d54b6e976172b66e6f5ff19bdb5215 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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,string("no such meta-variable ('")+n+"')");
	return rv->second;
    }

}