aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-01 18:58:56 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-01 18:58:56 +0100
commit844d571442ec56b93d58038ac21e7ddb9ab72744 (patch)
treec72702a409321db7bb8307c99a2fa488e6e6e9f7
parent0c3fad028817b7dff0d0c30b78d46b893360de54 (diff)
downloadlibmicrohttpd-844d571442ec56b93d58038ac21e7ddb9ab72744.tar.gz
libmicrohttpd-844d571442ec56b93d58038ac21e7ddb9ab72744.zip
remove useless 'if', fix HTML output
-rw-r--r--src/examples/post_example.c6
-rw-r--r--src/microhttpd/connection.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/examples/post_example.c b/src/examples/post_example.c
index 59b7fae7..885cdb1a 100644
--- a/src/examples/post_example.c
+++ b/src/examples/post_example.c
@@ -45,19 +45,19 @@
45 * Front page. (/) 45 * Front page. (/)
46 */ 46 */
47#define MAIN_PAGE \ 47#define MAIN_PAGE \
48 "<html><head><title>Welcome</title></head><body><form action=\"/2\" method=\"post\">What is your name? <input type=\"text\" name=\"v1\" value=\"%s\" /><input type=\"submit\" value=\"Next\" /></body></html>" 48 "<html><head><title>Welcome</title></head><body><form action=\"/2\" method=\"post\">What is your name? <input type=\"text\" name=\"v1\" value=\"%s\" /><input type=\"submit\" value=\"Next\" /></form></body></html>"
49 49
50/** 50/**
51 * Second page. (/2) 51 * Second page. (/2)
52 */ 52 */
53#define SECOND_PAGE \ 53#define SECOND_PAGE \
54 "<html><head><title>Tell me more</title></head><body><a href=\"/\">previous</a> <form action=\"/S\" method=\"post\">%s, what is your job? <input type=\"text\" name=\"v2\" value=\"%s\" /><input type=\"submit\" value=\"Next\" /></body></html>" 54 "<html><head><title>Tell me more</title></head><body><a href=\"/\">previous</a> <form action=\"/S\" method=\"post\">%s, what is your job? <input type=\"text\" name=\"v2\" value=\"%s\" /><input type=\"submit\" value=\"Next\" /></form></body></html>"
55 55
56/** 56/**
57 * Second page (/S) 57 * Second page (/S)
58 */ 58 */
59#define SUBMIT_PAGE \ 59#define SUBMIT_PAGE \
60 "<html><head><title>Ready to submit?</title></head><body><form action=\"/F\" method=\"post\"><a href=\"/2\">previous </a> <input type=\"hidden\" name=\"DONE\" value=\"yes\" /><input type=\"submit\" value=\"Submit\" /></body></html>" 60 "<html><head><title>Ready to submit?</title></head><body><form action=\"/F\" method=\"post\"><a href=\"/2\">previous </a> <input type=\"hidden\" name=\"DONE\" value=\"yes\" /><input type=\"submit\" value=\"Submit\" /></form></body></html>"
61 61
62/** 62/**
63 * Last page. 63 * Last page.
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 3f47c924..77ccfbfb 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1400,9 +1400,9 @@ build_header_response (struct MHD_Connection *connection)
1400 else 1400 else
1401 { 1401 {
1402 /* Keep alive or chunking not possible 1402 /* Keep alive or chunking not possible
1403 => set close header if not present */ 1403 => set close header (we know response_has_close
1404 if (! response_has_close) 1404 is false here) */
1405 must_add_close = true; 1405 must_add_close = true;
1406 } 1406 }
1407 } 1407 }
1408 1408