Skip to content

Fix Content-Type overriding#1956

Merged
hueniverse merged 1 commit intohapijs:masterfrom
gergoerdosi:content-type
Sep 18, 2014
Merged

Fix Content-Type overriding#1956
hueniverse merged 1 commit intohapijs:masterfrom
gergoerdosi:content-type

Conversation

@gergoerdosi
Copy link
Contributor

Similarly to #1760 it's not possible to use custom Content-Type header for files. The following doesn't work:

reply.file('./example').type('application/json');

The returned Content-Type header is application/octet-stream. This pull request fixes the issue and returns application/json.

lib/file.js Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 spaces

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the PR.

@hueniverse hueniverse added the bug Bug or defect label Sep 18, 2014
@hueniverse hueniverse self-assigned this Sep 18, 2014
hueniverse pushed a commit that referenced this pull request Sep 18, 2014
@hueniverse hueniverse merged commit e344a01 into hapijs:master Sep 18, 2014
@hueniverse hueniverse added this to the 6.9.0 milestone Sep 18, 2014
@gergoerdosi gergoerdosi deleted the content-type branch September 18, 2014 19:32
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Bug or defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants