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

Fix headers not passing during rack-test request #48

Merged
merged 1 commit into from
Apr 16, 2015
Merged

Fix headers not passing during rack-test request #48

merged 1 commit into from
Apr 16, 2015

Conversation

mcordell
Copy link
Contributor

When making a rack-test request (Rack app is mounted during airborne
config), the parameters were not passed into the request. For example:

get '/endpoint', { 'Content-Type' => 'text/plain' }

Would result in the /endpoint being hit without the above Content-Type
header. This commit resolves the issue by using the header method on
rack-test's Session class.

http://www.rubydoc.info/gems/rack-test/0.6.3/Rack/Test/Session#header-instance_method

When making a rack-test request (Rack app is mounted during airborne
config), the parameters were not passed into the request. For example:

```
get '/endpoint', { 'Content-Type' => 'text/plain' }
```

Would result in the /endpoint being hit without the above Content-Type
header. This commit resolves the issue by using the `header` method on
rack-test's `Session` class.

http://www.rubydoc.info/gems/rack-test/0.6.3/Rack/Test/Session#header-instance_method
@coveralls
Copy link

Coverage Status

Coverage increased (+0.0%) to 99.43% when pulling 6509331 on mcordell:fix-rack-headers into 3b41665 on brooklynDev:master.

@sethpollack
Copy link
Collaborator

Good catch, Thanks!

@sethpollack sethpollack reopened this Apr 16, 2015
sethpollack added a commit that referenced this pull request Apr 16, 2015
Fix headers not passing during rack-test request
@sethpollack sethpollack merged commit 72261c1 into brooklynDev:master Apr 16, 2015
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

Successfully merging this pull request may close these issues.

3 participants