forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c584e8f
commit 721dd15
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
commit 8815452257437ba36607d0e2381c01142d1c7bb0 | ||
Author: fanquake <fanquake@gmail.com> | ||
Date: Thu Nov 19 10:51:19 2020 +0800 | ||
|
||
Don't leak OS and miniupnpc version info in User-Agent | ||
|
||
diff --git a//minisoap.c b/minisoap.c | ||
index 7860667..775580b 100644 | ||
--- a/minisoap.c | ||
+++ b/minisoap.c | ||
@@ -90,7 +90,7 @@ int soapPostSubmit(SOCKET fd, | ||
headerssize = snprintf(headerbuf, sizeof(headerbuf), | ||
"POST %s HTTP/%s\r\n" | ||
"Host: %s%s\r\n" | ||
- "User-Agent: " OS_STRING ", " UPNP_VERSION_STRING ", MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n" | ||
+ "User-Agent: " UPNP_VERSION_STRING "\r\n" | ||
"Content-Length: %d\r\n" | ||
"Content-Type: text/xml\r\n" | ||
"SOAPAction: \"%s\"\r\n" | ||
diff --git a/miniwget.c b/miniwget.c | ||
index d5b7970..05aeb9c 100644 | ||
--- a/miniwget.c | ||
+++ b/miniwget.c | ||
@@ -444,7 +444,7 @@ miniwget3(const char * host, | ||
"GET %s HTTP/%s\r\n" | ||
"Host: %s:%d\r\n" | ||
"Connection: Close\r\n" | ||
- "User-Agent: " OS_STRING ", " UPNP_VERSION_STRING ", MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n" | ||
+ "User-Agent: " UPNP_VERSION_STRING "\r\n" | ||
|
||
"\r\n", | ||
path, httpversion, host, port); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
commit fec515a7ac9991a0ee91068fda046b54b191155e | ||
Author: fanquake <fanquake@gmail.com> | ||
Date: Wed Jul 27 15:52:37 2022 +0100 | ||
|
||
build: respect CFLAGS in makefile.mingw | ||
|
||
Similar to the other Makefile. | ||
|
||
Cherry-pick of https://github.com/miniupnp/miniupnp/pull/619. | ||
|
||
diff --git a/Makefile.mingw b/Makefile.mingw | ||
index 2bff7bd..88430d2 100644 | ||
--- a/Makefile.mingw | ||
+++ b/Makefile.mingw | ||
@@ -19,7 +19,7 @@ else | ||
RM = rm -f | ||
endif | ||
#CFLAGS = -Wall -g -DDEBUG -D_WIN32_WINNT=0X501 | ||
-CFLAGS = -Wall -W -Wstrict-prototypes -Os -DNDEBUG -D_WIN32_WINNT=0X501 | ||
+CFLAGS ?= -Wall -W -Wstrict-prototypes -Os -DNDEBUG -D_WIN32_WINNT=0X501 | ||
LDLIBS = -lws2_32 -liphlpapi | ||
# -lwsock32 | ||
# -liphlpapi is needed for GetBestRoute() and GetIpAddrTable() |