Skip to content

Commit 8c4fa73

Browse files
proxy: fix google_only plain HTTP content length (#70)
Body is exactly 120 bytes; header was advertising 128. Some clients treat that as truncated and hang waiting for extra bytes. Regression from #62.
1 parent 8be2083 commit 8c4fa73

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/proxy_server.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ async fn handle_http_client(
377377
.write_all(
378378
b"HTTP/1.1 502 Bad Gateway\r\n\
379379
Content-Type: text/plain; charset=utf-8\r\n\
380-
Content-Length: 128\r\n\
380+
Content-Length: 120\r\n\
381381
Connection: close\r\n\r\n\
382382
google_only mode: plain HTTP proxy requests are not supported. \
383383
Browse https over CONNECT, or switch to apps_script mode.",

0 commit comments

Comments
 (0)