Project

General

Profile

Actions

Bug #9513

closed

[Keep] keepproxy should not set content-length to -1 when responding 411 Length Required

Added by Tom Clegg almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Keep
Target version:
Story points:
0.5

Description

The code that checks the Content-Length request header for PUT requests, inexplicably, copies the request header into the response headers if there was an error parsing it as an int. It's unclear whether the intent was truly to copy the header when parsing failed, or whether err!=nil was a typo and the intent was to copy the header when parsing succeeded, but neither makes any sense: invalid headers are invalid, and there's no reason to expect the PUT response body to be the same size as the request body.


Subtasks 1 (0 open1 closed)

Task #9517: Review 9513-keepproxy-content-lengthResolvedTom Clegg06/29/2016Actions
Actions

Also available in: Atom PDF