src/server/protocol.c

changeset 9
30e51941a673
parent 8
f4d56bf9de40
child 11
24d804a2799f
--- a/src/server/protocol.c	Wed Dec 28 22:02:08 2011 +0100
+++ b/src/server/protocol.c	Thu Dec 29 18:51:23 2011 +0100
@@ -302,4 +302,13 @@
     rq->senthdrs = 1;
 }
 
-
+int request_header(char *name, char **value, Session *sn, Request *rq) {
+    const pb_key *key = pblock_key(name);
+    pb_param *pp = pblock_findkey(key, rq->headers);
+    if(pp != NULL) {
+        value = &pp->value;
+        return REQ_PROCEED;
+    } else {
+        return REQ_ABORTED;
+    }
+}

mercurial