src/server/httprequest.c

changeset 7
3c2ed7a7a5fd
parent 6
ce8fecc9847d
child 8
f4d56bf9de40
--- a/src/server/httprequest.c	Tue Dec 27 20:12:21 2011 +0100
+++ b/src/server/httprequest.c	Wed Dec 28 10:57:36 2011 +0100
@@ -135,6 +135,20 @@
             rq->rq.reqpb);
 
     // pass http header to the NSAPI request structure
+    int         hlen = request->headers->len;
+    HeaderArray *ha  = request->headers;
+    for(int i=0;i<=hlen;i++) {
+        if(i == hlen) {
+            ha = ha->next;
+            if(ha == NULL) {
+                break;
+            }
+            i = 0;
+            hlen = ha->len;
+        }
+
+        pblock_nvinsert(ha->headers[i].name, ha->headers[i].value, rq->rq.headers);
+    }
 
 
     // Send the request to the NSAPI system

mercurial