]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
browser-wpadebug: Send HTTP response with HTTP/1.1 header
authorPurushottam Kushwaha <pkushwah@qti.qualcomm.com>
Thu, 16 Feb 2017 06:22:46 +0000 (11:52 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 16 Feb 2017 11:35:44 +0000 (13:35 +0200)
HTTP response was previously sent as a plaintext without the HTTP header
on port 12345. By default Android webview/Chrome assumes plaintext as
HTTP/0.9 data. Android webview/Chrome has removed support of HTTP/0.9
request/response on non-standard ports, i.e., other than port 80. This
results in error while opening URL 'http://localhost:12345/'.

Fix this by prefixing the HTTP response with the HTTP/1.1 header.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/utils/browser-wpadebug.c

index 59ba4d1e02d86a879282d4e6a152f96e1b03873d..062e6fef1f5a6f321faf70d96f4291bc9f14ef09 100644 (file)
@@ -52,7 +52,7 @@ static void http_req(void *ctx, struct http_request *req)
                        eloop_terminate();
                return;
        }
-       wpabuf_put_str(resp, "User input completed");
+       wpabuf_put_str(resp, "HTTP/1.1\r\n\r\nUser input completed");
 
        if (done) {
                eloop_cancel_timeout(browser_timeout, NULL, NULL);