Skip to content

rgw: improve content-length env var handling#4436

Merged
yehudasa merged 3 commits intoceph:masterfrom
BCLibCoop:bclibcoop/rgw-content_length
May 15, 2015
Merged

rgw: improve content-length env var handling#4436
yehudasa merged 3 commits intoceph:masterfrom
BCLibCoop:bclibcoop/rgw-content_length

Conversation

@robbat2
Copy link
Contributor

@robbat2 robbat2 commented Apr 22, 2015

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]

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]>
@robbat2
Copy link
Contributor Author

robbat2 commented Apr 23, 2015

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.

@robbat2
Copy link
Contributor Author

robbat2 commented Apr 24, 2015

@yehudasa good to merge then?

@yehudasa
Copy link
Member

@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)

@robbat2
Copy link
Contributor Author

robbat2 commented Apr 24, 2015

@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.

@yehudasa
Copy link
Member

@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]>
@robbat2
Copy link
Contributor Author

robbat2 commented Apr 24, 2015

@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.

@yehudasa
Copy link
Member

@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.

@ghost ghost added rgw feature labels May 13, 2015
@robbat2
Copy link
Contributor Author

robbat2 commented May 15, 2015

@yehudasa are you ever going to release this? It stands to miss the 0.94.2 release now as well, and leaves RGW broken on Hammer for some clients.
@dachary
Should probably be tagged with bugfix NOT feature.

yehudasa added a commit that referenced this pull request May 15, 2015
rgw: improve content-length env var handling

Reviewed-by: Yehuda Sadeh <[email protected]>
@yehudasa yehudasa merged commit 7ee4a04 into ceph:master May 15, 2015
theanalyst pushed a commit to theanalyst/ceph that referenced this pull request Jul 1, 2015
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)
smithfarm pushed a commit to SUSE/ceph that referenced this pull request Jul 14, 2015
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)
ghost pushed a commit that referenced this pull request Jul 31, 2015
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants