diff options
author | nicolas.dufresne <nicolas.dufresne@c587cffe-e639-0410-9787-d7902ae8ed56> | 2011-06-06 21:35:49 +0000 |
---|---|---|
committer | nicolas.dufresne <nicolas.dufresne@c587cffe-e639-0410-9787-d7902ae8ed56> | 2011-06-06 21:35:49 +0000 |
commit | 358b2d2ae9aba8a8488fa161de7d06d9815e5869 (patch) | |
tree | e0a75920dda73f5eb8efe2af0e83c0390e471a0f | |
parent | 731b3396cc6781a2c81f3567bd99adcc7d966a43 (diff) | |
download | libproxy-git-358b2d2ae9aba8a8488fa161de7d06d9815e5869.tar.gz |
Remove unused mime type check
-rw-r--r-- | libproxy/url.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libproxy/url.cpp b/libproxy/url.cpp index 0ea1141..e6806cc 100644 --- a/libproxy/url.cpp +++ b/libproxy/url.cpp @@ -381,7 +381,7 @@ static inline string recvline(int fd) { char* url::get_pac() { int sock = -1; - bool correct_mime_type = false, chunked = false; + bool chunked = false; unsigned long int content_length = 0, status = 0; char* buffer = NULL; string request; @@ -445,14 +445,8 @@ char* url::get_pac() { if (sscanf(line.c_str(), "HTTP/1.%*d %lu", &status) == 1 && status == 200) { /* Check for correct mime type and content length */ for (line = recvline(sock) ; line != "\r" && line != "" ; line = recvline(sock)) { - // Check for content type - if (line.find("Content-Type: ") == 0 && - (line.find(PAC_MIME_TYPE) != string::npos || - line.find(PAC_MIME_TYPE_FB) != string::npos)) - correct_mime_type = true; - // Check for chunked encoding - else if (line.find("Content-Transfer-Encoding: chunked") == 0) + if (line.find("Content-Transfer-Encoding: chunked") == 0) chunked = true; // Check for content length |