From 71f62d1935c24495cc50f5a86e4fb6dae271a423 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 4 Nov 2008 18:44:07 +0000 Subject: [PATCH] skip unexpected blank lines --- panda/src/downloader/httpChannel.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/panda/src/downloader/httpChannel.cxx b/panda/src/downloader/httpChannel.cxx index e602a3aa83..24cea87c2b 100644 --- a/panda/src/downloader/httpChannel.cxx +++ b/panda/src/downloader/httpChannel.cxx @@ -1118,6 +1118,13 @@ run_http_proxy_request_sent() { return true; } + // Skip unexpected blank lines. We're just being generous here. + while (line.empty()) { + if (!server_getline_failsafe(line)) { + return true; + } + } + if (!parse_http_response(line)) { return false; } @@ -1704,6 +1711,13 @@ run_request_sent() { return true; } + // Skip unexpected blank lines. We're just being generous here. + while (line.empty()) { + if (!server_getline_failsafe(line)) { + return true; + } + } + if (!parse_http_response(line)) { // Not an HTTP response. _state is already set appropriately. return false;