author | Michael Krelin <hacker@klever.net> | 2005-05-09 11:00:28 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2005-05-09 11:00:28 (UTC) |
commit | 43d47575878e4eaf3c8da84bf609fcd0bde595fb (patch) (unidiff) | |
tree | f7ec4d1f0d0a01b43feb5c9b4f414e870036522c /src/cgi_gateway.cc | |
parent | d9578a5ae0ac4e44ff5e3c13d3f39f400f51bcf2 (diff) | |
download | kingate-43d47575878e4eaf3c8da84bf609fcd0bde595fb.zip kingate-43d47575878e4eaf3c8da84bf609fcd0bde595fb.tar.gz kingate-43d47575878e4eaf3c8da84bf609fcd0bde595fb.tar.bz2 |
1. http headers container added
2. preliminary cookies support
3. absolutely useless http_quoted_string and http_quote utility functions added
-rw-r--r-- | src/cgi_gateway.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cgi_gateway.cc b/src/cgi_gateway.cc index 30410f2..ab48f78 100644 --- a/src/cgi_gateway.cc +++ b/src/cgi_gateway.cc | |||
@@ -22,16 +22,20 @@ namespace kingate { | |||
22 | char * tmp = new char[cl]; | 22 | char * tmp = new char[cl]; |
23 | iface.in().read(tmp,cl); | 23 | iface.in().read(tmp,cl); |
24 | string qs(tmp,cl); | 24 | string qs(tmp,cl); |
25 | delete tmp; | 25 | delete tmp; |
26 | parse_query(qs,post); | 26 | parse_query(qs,post); |
27 | } | 27 | } |
28 | b_parsed_content = true; | 28 | b_parsed_content = true; |
29 | } | 29 | } |
30 | // Parse cookies | ||
31 | try { | ||
32 | cookies.parse_cookies(get_meta("HTTP_COOKIE")); | ||
33 | }catch(exception_notfound& enf) { } | ||
30 | } | 34 | } |
31 | 35 | ||
32 | bool cgi_gateway::has_GET(const string& n) const { | 36 | bool cgi_gateway::has_GET(const string& n) const { |
33 | return get.find(n) != get.end(); | 37 | return get.find(n) != get.end(); |
34 | } | 38 | } |
35 | const string& cgi_gateway::get_GET(const string& n) const { | 39 | const string& cgi_gateway::get_GET(const string& n) const { |
36 | params_t::const_iterator i = get.find(n); | 40 | params_t::const_iterator i = get.find(n); |
37 | if(i==get.end()) | 41 | if(i==get.end()) |