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

Header Capitalization and Underscorizing #1

Closed
erithmetic opened this issue May 14, 2009 · 2 comments
Closed

Header Capitalization and Underscorizing #1

erithmetic opened this issue May 14, 2009 · 2 comments

Comments

@erithmetic
Copy link

Bryan,

First thanks for all you awesome work on Rack::Test!

We are using Rack::Test to test the interplay of several rack apps. We've been using some custom headers, similar to X-Custom-Header. Our code expects that the request env should contain env['HTTP_X_CUSTOM_HEADER']. Looking through Rack::Test, we saw that headers are not renamed when Rack::Test::Session#header('X-Custom-Header','value') was used.

Is this intentional?

According to Google, all web servers send headers in this uppercase, underscorized form to CGI apps. Is this something Rack::Test should emulate or should we roll our own solution?

Thanks!

-Derek

@erithmetic
Copy link
Author

Also, according to http://rack.rubyforge.org/doc/files/SPEC.html, Rack expects the environment to have all headers translated to HTTP_* format.

@brynary
Copy link
Collaborator

brynary commented Sep 19, 2009

Hey Derek,

Thanks for the report. Sorry it took awhile to get to this -- Wasn't looking here for bug reports.

I believe you are correct about the behavior. Just pushed a fix to master, which will go into a 0.5 release.

Cheers,

-Bryan

brynary pushed a commit that referenced this issue Sep 18, 2013
Fix support for params with arrays of hashes in multipart forms.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants