From 5db32adc992784e7de4171363c787c5e6c76dda6 Mon Sep 17 00:00:00 2001 From: Purushottam Kushwaha Date: Thu, 16 Feb 2017 11:52:46 +0530 Subject: [PATCH] browser-wpadebug: Send HTTP response with HTTP/1.1 header 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 --- src/utils/browser-wpadebug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/browser-wpadebug.c b/src/utils/browser-wpadebug.c index 59ba4d1e0..062e6fef1 100644 --- a/src/utils/browser-wpadebug.c +++ b/src/utils/browser-wpadebug.c @@ -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);