Skip to content

Return early from removeContentHeaders if res._headers is null - #942

Merged
dougwilson merged 1 commit into
senchalabs:masterfrom
laktek:master
Oct 24, 2013
Merged

Return early from removeContentHeaders if res._headers is null#942
dougwilson merged 1 commit into
senchalabs:masterfrom
laktek:master

Conversation

@laktek

@laktek laktek commented Oct 24, 2013

Copy link
Copy Markdown
Contributor

Not sure if it's useful since this is a private API method. But I happened to invoke with headers set to null from another project.

@dougwilson

Copy link
Copy Markdown
Contributor

This seems like a good idea since res._headers comes from node code and it only gets defined when headers get set, so there should be some guard in that method to keep it from blowing up.

@dougwilson

Copy link
Copy Markdown
Contributor

@laktek Can you put that space back on the first line and squash into the original commit? Having the blank line is intentional.

@jonathanong

Copy link
Copy Markdown
Contributor

haha that space is such a silly thing to care about :P

@laktek

laktek commented Oct 24, 2013

Copy link
Copy Markdown
Contributor Author

@dougwilson done.

dougwilson added a commit that referenced this pull request Oct 24, 2013
Fix removeContentHeaders to work if no headers have been set
@dougwilson
dougwilson merged commit d194eca into senchalabs:master Oct 24, 2013
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