[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r26254 - libmicrohttpd/src/testcurl
From: |
gnunet |
Subject: |
[GNUnet-SVN] r26254 - libmicrohttpd/src/testcurl |
Date: |
Sat, 2 Mar 2013 03:46:48 +0100 |
Author: grothoff
Date: 2013-03-02 03:46:47 +0100 (Sat, 02 Mar 2013)
New Revision: 26254
Modified:
libmicrohttpd/src/testcurl/daemontest_process_arguments.c
Log:
-test case for %A0-issue reported on the list
Modified: libmicrohttpd/src/testcurl/daemontest_process_arguments.c
===================================================================
--- libmicrohttpd/src/testcurl/daemontest_process_arguments.c 2013-03-01
19:34:34 UTC (rev 26253)
+++ libmicrohttpd/src/testcurl/daemontest_process_arguments.c 2013-03-02
02:46:47 UTC (rev 26254)
@@ -1,11 +1,10 @@
-
/*
This file is part of libmicrohttpd
- (C) 2007 Christian Grothoff
+ (C) 2007, 2013 Christian Grothoff
libmicrohttpd is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 2, or (at your
+ by the Free Software Foundation; either version 3, or (at your
option) any later version.
libmicrohttpd is distributed in the hope that it will be useful, but
@@ -46,6 +45,7 @@
size_t size;
};
+
static size_t
copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx)
{
@@ -58,6 +58,7 @@
return size * nmemb;
}
+
static int
ahc_echo (void *cls,
struct MHD_Connection *connection,
@@ -86,8 +87,16 @@
abort ();
hdr = MHD_lookup_connection_value (connection,
MHD_GET_ARGUMENT_KIND, "hash");
- if ((hdr == NULL) || (0 != strcmp (hdr, "#")))
+ if ((hdr == NULL) || (0 != strcmp (hdr, "#foo")))
abort ();
+ hdr = MHD_lookup_connection_value (connection,
+ MHD_GET_ARGUMENT_KIND, "space");
+ if ((hdr == NULL) || (0 != strcmp (hdr, "\240bar")))
+ abort ();
+ if (3 != MHD_get_connection_values (connection,
+ MHD_GET_ARGUMENT_KIND,
+ NULL, NULL))
+ abort ();
response = MHD_create_response_from_buffer (strlen (url),
(void *) url,
MHD_RESPMEM_MUST_COPY);
@@ -98,6 +107,7 @@
return ret;
}
+
static int
testExternalGet ()
{
@@ -126,7 +136,7 @@
return 256;
c = curl_easy_init ();
curl_easy_setopt (c, CURLOPT_URL,
- "http://127.0.0.1:21080/hello_world?k=v+x&hash=%23");
+
"http://127.0.0.1:21080/hello_world?k=v+x&hash=%23foo&space=%A0bar");
curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, ©Buffer);
curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r26254 - libmicrohttpd/src/testcurl,
gnunet <=