[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22656 - gnunet/src/gns
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22656 - gnunet/src/gns |
Date: |
Sat, 14 Jul 2012 17:58:23 +0200 |
Author: schanzen
Date: 2012-07-14 17:58:23 +0200 (Sat, 14 Jul 2012)
New Revision: 22656
Modified:
gnunet/src/gns/gnunet-gns-proxy.c
Log:
-fix
Modified: gnunet/src/gns/gnunet-gns-proxy.c
===================================================================
--- gnunet/src/gns/gnunet-gns-proxy.c 2012-07-14 15:46:58 UTC (rev 22655)
+++ gnunet/src/gns/gnunet-gns-proxy.c 2012-07-14 15:58:23 UTC (rev 22656)
@@ -288,6 +288,9 @@
struct ProxyPostData *post_data_tail;
int post_done;
+
+ /* the type of POST encoding */
+ char* post_type;
};
@@ -512,7 +515,11 @@
"Got POST data: '%s : %s' at offset %llu size %lld\n",
key, data, off, size);
- /* FIXME ! if transfer enc == urlenc! */
+ if (0 != strcasecmp (MHD_HTTP_POST_ENCODING_FORM_URLENCODED,
+ ctask->post_type))
+ {
+ return MHD_NO;
+ }
if (0 == off)
{
@@ -607,6 +614,20 @@
else
hdr_val = value;
+ if (0 == strcmp (MHD_HTTP_HEADER_CONTENT_TYPE,
+ key))
+ {
+ if (0 == strcmp (value,
+ MHD_HTTP_POST_ENCODING_FORM_URLENCODED))
+ ctask->post_type = MHD_HTTP_POST_ENCODING_FORM_URLENCODED;
+ else if (0 == strcmp (value,
+ MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA))
+ ctask->post_type = MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA;
+ else
+ ctask->post_type = NULL;
+
+ }
+
cstr = GNUNET_malloc (strlen (key) + strlen (hdr_val) + 3);
GNUNET_snprintf (cstr, strlen (key) + strlen (hdr_val) + 3,
"%s: %s", key, hdr_val);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22656 - gnunet/src/gns,
gnunet <=