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

mockRequest.header() doesn't handle the Referrer header field edge-cased #50

Closed
estilles opened this issue Mar 19, 2015 · 1 comment
Closed
Assignees
Milestone

Comments

@estilles
Copy link

According to Express:

The Referrer header field is special-cased, both Referrer and Referer are interchangeable.

mockRequest.header() does not currently handle this edge-case.

@estilles estilles self-assigned this Mar 19, 2015
@estilles estilles added this to the v1.2.6 milestone Mar 19, 2015
estilles pushed a commit to estilles/node-mocks-http that referenced this issue Mar 19, 2015
- implementing referrer header edge-case
- making mockRequest.header() an alias of .get(), mimicking Express' implementation
- ensure header names are stored in lowercase
- added tests for mockRequest.get(), .header() and referer/referrer edge case
@estilles
Copy link
Author

Fixed via 984afca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant