[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r27263 - libmicrohttpd/src/spdy2http
From: |
gnunet |
Subject: |
[GNUnet-SVN] r27263 - libmicrohttpd/src/spdy2http |
Date: |
Thu, 23 May 2013 12:45:49 +0200 |
Author: andreyu
Date: 2013-05-23 12:45:49 +0200 (Thu, 23 May 2013)
New Revision: 27263
Modified:
libmicrohttpd/src/spdy2http/proxy.c
Log:
spdy2http changes to use it as a forward proxy
Modified: libmicrohttpd/src/spdy2http/proxy.c
===================================================================
--- libmicrohttpd/src/spdy2http/proxy.c 2013-05-22 22:52:48 UTC (rev 27262)
+++ libmicrohttpd/src/spdy2http/proxy.c 2013-05-23 10:45:49 UTC (rev 27263)
@@ -20,6 +20,10 @@
* @file proxy.c
* @brief Translates incoming SPDY requests to http server on localhost.
* Uses libcurl.
+ * BUGS:
+ * Now the proxy works only when the HTTP server issues
+ * "Content-Length" header. Will brake on chunhed response.
+ * No error handling for curl requests.
* @author Andrey Uzunov
*/
@@ -422,7 +426,12 @@
abort();
}
- if(-1 == asprintf(&url,"%s%s%s","http://", http_host, path))
+ if(0 == strcmp(http_host, "any"))
+ ret = asprintf(&url,"%s%s%s","http://", host, path);
+ else
+ ret = asprintf(&url,"%s%s%s","http://", http_host, path);
+
+ if(-1 == ret)
{
PRINT_INFO("No memory");
abort();
@@ -489,7 +498,10 @@
if(argc != 6)
{
- printf("Usage: %s cert-file key-file host port
http/1.0(yes/no)\n", argv[0]);
+ printf("Usage: %s cert-file key-file host port
http/1.0(yes/no)\n\
+\n\
+Example for forward proxy (':host' header is used to know which HTTP server to
connect):\n\
+%s cert.pem key.pem any 8080 no\n", argv[0], argv[0]);
return 1;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r27263 - libmicrohttpd/src/spdy2http,
gnunet <=