Closed leoliu closed 5 years ago
Do you have test cases that show a problem in this area?
Good question. Interestingly most web servers seem to misimplement this until someone reported it though I am struggling to find a case where this is an issue.
The content-length
header cannot be corrected from an appmod. For example, I need to serve images files from an appmod and set content-length
header to the correct size for a 304 response, but Yaws always override the content-length
to 0.
@vinoski After https://github.com/klacke/yaws/commit/2267f61251b802e58afa8fe1705828350a0d5058 it is still impossible to erase the content_length header for 304 responses from an appmod. "Content-Length: 0" is wrong for 304 responses.
My apologies, fixed on master.
Thanks a lot. Using it now.
https://tools.ietf.org/html/rfc7230#section-3.3.2