libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 844d571442ec56b93d58038ac21e7ddb9ab72744
parent 0c3fad028817b7dff0d0c30b78d46b893360de54
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun,  1 Mar 2020 18:58:56 +0100

remove useless 'if', fix HTML output

Diffstat:
Msrc/examples/post_example.c | 6+++---
Msrc/microhttpd/connection.c | 6+++---
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/examples/post_example.c b/src/examples/post_example.c @@ -45,19 +45,19 @@ * Front page. (/) */ #define MAIN_PAGE \ - "<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>" + "<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>" /** * Second page. (/2) */ #define SECOND_PAGE \ - "<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>" + "<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>" /** * Second page (/S) */ #define SUBMIT_PAGE \ - "<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>" + "<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>" /** * Last page. diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -1400,9 +1400,9 @@ build_header_response (struct MHD_Connection *connection) else { /* Keep alive or chunking not possible - => set close header if not present */ - if (! response_has_close) - must_add_close = true; + => set close header (we know response_has_close + is false here) */ + must_add_close = true; } }