-
Notifications
You must be signed in to change notification settings - Fork 509
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
Invalid Content-Length header returned by REST API #8080
Comments
Hi, not sure I can follow here. Why is that supposed to be invalid please? And what's the impact of that? |
Good catch, not sure if it was really invalid or browsers just being tolerant on it. |
@manup Thanks. Sorry I didn't catch this sooner, but the |
This is no bug at all as functionality is not impacted. RFC 7230 yields that the referred to space is optional. Just saying... |
Indeed this is not strictly a spec violation, but rather an invocation of Postel's law. Some clients are less tolerant of the less common non-spaced version, so the robustness principle would suggest including it, while also answering the question of how functionality is impacted. This is certainly true when the omission is neither deliberate nor consistent, which should also serve to make any possible argument concerning bug compatibility moot (the change is not against spec). |
Does the issue really belong here?
Is there already an existing issue for this?
Describe the bug
The webserver returning content for the REST API returns an invalid value for the Content-Length header. Specifically, it lacks a space before the value.
Steps to reproduce the behavior
Easily reproduced with cURL:
The error is seemingly exhibited on all endpoints:
And irrespective of verb:
Expected behavior
Content-Length header should include the mandatory space to make it valid:
Content-Length: 520310
Environment
The text was updated successfully, but these errors were encountered: