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 204 response header contains Content-Length value #7231

Closed
szgy opened this issue Apr 20, 2023 · 3 comments
Closed

HTTP 204 response header contains Content-Length value #7231

szgy opened this issue Apr 20, 2023 · 3 comments

Comments

@szgy
Copy link

szgy commented Apr 20, 2023

Bug Report

Describe the bug
The http_prot.c (https://github.com/fluent/fluent-bit/blob/master/plugins/in_http/http_prot.c) line 73 contains this code:

flb_sds_printf(&out, "HTTP/1.1 204 No Content\r\n" "Server: Fluent Bit v%s\r\n" "%s" "Content-Length: 0\r\n\r\n", FLB_VERSION_STR, context->success_headers_str);

which is in contradiction with the RFC 9110 HTTP Semantics / Content Length :

A server MUST NOT send a Content-Length header field in any response with a status code of 1xx (Informational) or 204 (No Content). A server MUST NOT send a Content-Length header field in any 2xx (Successful) response to a CONNECT request (Section 9.3.6).

To Reproduce
NA: Was a code review

Expected behavior
HTTP Response should follow specifications

Screenshots
NA: Was a code review

Your Environment
NA: Was a code review

Additional context

nokute78 added a commit to nokute78/fluent-bit that referenced this issue Apr 30, 2023
@nokute78
Copy link
Collaborator

Thank you for pointing it.
I sent a patch #7291

nokute78 added a commit to nokute78/fluent-bit that referenced this issue Apr 30, 2023
@github-actions
Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

@github-actions github-actions bot added the Stale label Jul 29, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants