rgw: improve content-length env var handling#4436
rgw: improve content-length env var handling#4436yehudasa merged 3 commits intoceph:masterfrom BCLibCoop:bclibcoop/rgw-content_length
Conversation
The FastCGI specification, section 6.3 on Authorizers, describes a case where HTTP_CONTENT_LENGTH will be set in the environment and CONTENT_LENGTH will NOT be set. Further documention in the code. Fixes: #11419 Signed-off-by: Robin H. Johnson <[email protected]>
|
The older versions of the webservers look like they get that part of the FastCGI spec quite muddled; I'm not sure if simply trusting HTTP_CONTENT_LENGTH over CONTENT_LENGTH is wise, esp when it might be simply \0, and CONTENT_LENGTH is something real. |
|
@yehudasa good to merge then? |
|
@robbat2 still thinking about this one. I'm not extremely happy about adding this extra code that only applies to old buggy web servers and would add extra cpu work and make the code more complicated than needed. I'd be happier if there was some middle grounds solution that could work for all (e.g., with some extra configuration for the special case) |
|
@yehudasa what if I put in a config boolean to disable the deconfliction case? I don't like it, but if that's what you think is best. |
|
@robbat2 yeah, that would probably make it easier to swallow |
Per request from Yehuda, the deconfliction for having both HTTP_CONTENT_LENGTH and CONTENT_LENGTH set is now optional, and controlled by new configuration boolean, which defaults to false. rgw content length compat X-URL: #4436 (comment) Signed-off-by: Robin H. Johnson <[email protected]>
|
@yehudasa Made optional now, please review for main tree; some of our users would really like to be able to create directories via DragonDisk again. |
|
@robbat2 I pushed another commit on top of your stuff to wip-rgw-content-length. There are a few fixes there, but also some cleanup. Can you take a look? This will need to be tested. |
Signed-off-by: Yehuda Sadeh <[email protected]>
rgw: improve content-length env var handling Reviewed-by: Yehuda Sadeh <[email protected]>
Per request from Yehuda, the deconfliction for having both HTTP_CONTENT_LENGTH and CONTENT_LENGTH set is now optional, and controlled by new configuration boolean, which defaults to false. rgw content length compat X-URL: ceph#4436 (comment) Signed-off-by: Robin H. Johnson <[email protected]> (cherry picked from commit 79d17af)
Per request from Yehuda, the deconfliction for having both HTTP_CONTENT_LENGTH and CONTENT_LENGTH set is now optional, and controlled by new configuration boolean, which defaults to false. rgw content length compat X-URL: ceph#4436 (comment) Signed-off-by: Robin H. Johnson <[email protected]> (cherry picked from commit 79d17af)
Per request from Yehuda, the deconfliction for having both HTTP_CONTENT_LENGTH and CONTENT_LENGTH set is now optional, and controlled by new configuration boolean, which defaults to false. rgw content length compat X-URL: #4436 (comment) Signed-off-by: Robin H. Johnson <[email protected]> (cherry picked from commit 79d17af)
The FastCGI specification, section 6.3 on Authorizers, describes a case
where HTTP_CONTENT_LENGTH will be set in the environment and
CONTENT_LENGTH will NOT be set.
Further documention in the code.
Compile-tested, but waiting for the testsuite to validate functionality.
Fixes: #11419
Signed-off-by: Robin H. Johnson [email protected]