summaryrefslogtreecommitdiffhomepage
path: root/contrib/axtls/patches
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/axtls/patches')
-rw-r--r--contrib/axtls/patches/001-ld-fix.patch12
-rw-r--r--contrib/axtls/patches/002-httpd-fix.patch12
-rw-r--r--contrib/axtls/patches/003-content-type.patch37
3 files changed, 61 insertions, 0 deletions
diff --git a/contrib/axtls/patches/001-ld-fix.patch b/contrib/axtls/patches/001-ld-fix.patch
new file mode 100644
index 000000000..245600705
--- /dev/null
+++ b/contrib/axtls/patches/001-ld-fix.patch
@@ -0,0 +1,12 @@
+diff -urb axTLS.orig/ssl/Makefile axTLS/ssl/Makefile
+--- axTLS.orig/ssl/Makefile 2008-11-09 00:58:43.000000000 +0000
++++ axTLS/ssl/Makefile 2008-11-09 00:58:57.000000000 +0000
+@@ -96,7 +96,7 @@
+
+ $(TARGET2) : $(OBJ)
+ ifndef CONFIG_PLATFORM_CYGWIN
+- $(LD) $(LDFLAGS) $(LDSHARED) -Wl,-soname,$(LIBMAJOR) -o $(AXTLS_HOME)/$(STAGE)/$(LIBMINOR) $(CRYPTO_OBJ) $(OBJ)
++ $(LD) $(LDFLAGS) $(LDSHARED) -o $(AXTLS_HOME)/$(STAGE)/$(LIBMINOR) $(CRYPTO_OBJ) $(OBJ)
+ cd $(AXTLS_HOME)/$(STAGE); ln -sf $(LIBMINOR) $(LIBMAJOR); ln -sf $(LIBMAJOR) $(BASETARGET); cd -
+ else
+ $(LD) $(LDFLAGS) $(LDSHARED) -o $(AXTLS_HOME)/$(STAGE)/cygaxtls.dll \
diff --git a/contrib/axtls/patches/002-httpd-fix.patch b/contrib/axtls/patches/002-httpd-fix.patch
new file mode 100644
index 000000000..e6fd152d8
--- /dev/null
+++ b/contrib/axtls/patches/002-httpd-fix.patch
@@ -0,0 +1,12 @@
+diff -urb axTLS.orig/httpd/Makefile axTLS/httpd/Makefile
+--- axTLS.orig/httpd/Makefile 2008-11-09 00:58:44.000000000 +0000
++++ axTLS/httpd/Makefile 2008-11-09 01:29:55.000000000 +0000
+@@ -95,7 +95,7 @@
+ ifndef CONFIG_PLATFORM_WIN32
+
+ $(TARGET): $(OBJ) $(AXTLS_HOME)/$(STAGE)/libaxtls.a
+- $(LD) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
++ $(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
+ ifdef CONFIG_STRIP_UNWANTED_SECTIONS
+ strip --remove-section=.comment $(TARGET)
+ endif
diff --git a/contrib/axtls/patches/003-content-type.patch b/contrib/axtls/patches/003-content-type.patch
new file mode 100644
index 000000000..476890cf1
--- /dev/null
+++ b/contrib/axtls/patches/003-content-type.patch
@@ -0,0 +1,37 @@
+diff -urb axTLS.orig/httpd/axhttp.h axTLS/httpd/axhttp.h
+--- axTLS.orig/httpd/axhttp.h 2008-11-09 00:58:44.000000000 +0000
++++ axTLS/httpd/axhttp.h 2008-11-09 02:33:44.000000000 +0000
+@@ -91,6 +91,7 @@
+ uint8_t is_lua;
+ #endif
+ int content_length;
++ char content_type[MAXREQUESTLENGTH];
+ char remote_addr[MAXREQUESTLENGTH];
+ char uri_request[MAXREQUESTLENGTH];
+ char uri_path_info[MAXREQUESTLENGTH];
+diff -urb axTLS.orig/httpd/proc.c axTLS/httpd/proc.c
+--- axTLS.orig/httpd/proc.c 2008-11-09 00:58:44.000000000 +0000
++++ axTLS/httpd/proc.c 2008-11-09 02:43:32.000000000 +0000
+@@ -129,6 +129,10 @@
+
+ my_strncpy(cn->server_name, value, MAXREQUESTLENGTH);
+ }
++ else if (strcmp(buf, "Content-Type:") == 0 )
++ {
++ my_strncpy(cn->content_type, value, MAXREQUESTLENGTH);
++ }
+ else if (strcmp(buf, "Connection:") == 0 && strcmp(value, "close") == 0)
+ {
+ cn->close_when_done = 1;
+@@ -673,8 +677,9 @@
+ type = "POST";
+ sprintf(cgienv[cgi_index++],
+ "CONTENT_LENGTH=%d", cn->content_length);
+- strcpy(cgienv[cgi_index++], /* hard-code? */
+- "CONTENT_TYPE=application/x-www-form-urlencoded");
++ snprintf(cgienv[cgi_index++], MAXREQUESTLENGTH,
++ "CONTENT_TYPE=%s", cn->content_type);
++
+ break;
+ }
+