summaryrefslogtreecommitdiffabout
path: root/src/plaincgi.cc
Side-by-side diff
Diffstat (limited to 'src/plaincgi.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--src/plaincgi.cc27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/plaincgi.cc b/src/plaincgi.cc
new file mode 100644
index 0000000..6934748
--- a/dev/null
+++ b/src/plaincgi.cc
@@ -0,0 +1,27 @@
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include "kingate/plaincgi.h"
+#include "kingate/exception.h"
+
+namespace kingate {
+
+ plaincgi_interface::plaincgi_interface() {
+ for(char **p = environ; *p; p++) {
+ const char *e = strchr(*p,'=');
+ if(!e){
+ // XXX: check if we have it already?
+ metavars[*p] = string(0);
+ }else{
+ int l = e-*p; e++;
+ // XXX: check if we have it already?
+ metavars[string(*p,l)]=e;
+ }
+ }
+ }
+ plaincgi_interface::~plaincgi_interface() {
+ cout.flush();
+ cerr.flush();
+ }
+
+}