summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicolas.dufresne <nicolas.dufresne@c587cffe-e639-0410-9787-d7902ae8ed56>2011-06-06 21:35:49 +0000
committernicolas.dufresne <nicolas.dufresne@c587cffe-e639-0410-9787-d7902ae8ed56>2011-06-06 21:35:49 +0000
commitc746e75b594582427c30842e02356d58505ebf29 (patch)
treee0a75920dda73f5eb8efe2af0e83c0390e471a0f
parent9c87e1b8ee2b773b91fa45ad1364c23a4771ff67 (diff)
downloadlibproxy-c746e75b594582427c30842e02356d58505ebf29.tar.gz
Remove unused mime type check
git-svn-id: http://libproxy.googlecode.com/svn/trunk@812 c587cffe-e639-0410-9787-d7902ae8ed56
-rw-r--r--libproxy/url.cpp10
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