Project

General

Profile

Actions

Bug #13582

closed

RGW should not send a Content-Length header with a 204 response

Added by Wido den Hollander over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Target version:
-
% Done:

0%

Source:
Community (dev)
Tags:
civetweb,rgw,varnish
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Currently RGW (with Civetweb) responds with a 'Content-Length: 0' header on a DELETE.

204 OK HTTP/1.1
Content-Length: 0

This causes a backend error with for example the Varnish proxy since the Content-Length header is not allowed on a 204 response.

RFC7230 says:

A server MUST NOT send a Content-Length header field in any response with a status code of 1xx (Informational) or 204 (No Content).

We should not send a Content-Length header when the response-code is 1xx or 204 since no Content is being send.

Actions #1

Updated by Ken Dreyer over 8 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF