Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP: Don't attempt to needlessly decompress redirect body #2798

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/transfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ static CURLcode readwrite_data(struct Curl_easy *data,
nread);
}
}
else
else if(!k->ignorebody)
result = Curl_unencode_write(conn, k->writer_stack, k->str, nread);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

result is checked right after this in all cases so i'd add this

else
  result = CURLE_OK;

because what if it's set to CURLE_AGAIN and or something at that point, otherwise it's just going to return that and it shouldn't, (unless I'm reading it wrong)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is set to CURLE_OK at the top of the function and then it gets checked every time it gets assigned so I don't think there's a risk for that...

}
k->badheader = HEADER_NORMAL; /* taken care of now */
Expand Down