-
-
Notifications
You must be signed in to change notification settings - Fork 980
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
Proxy res.end(callback) calls correctly #751
Open
theneva
wants to merge
23
commits into
expressjs:master
Choose a base branch
from
theneva:res-end-callback
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
431fbb7
Proxy res.end(callback) calls correctly
theneva 2482cf2
work in progress, doesn't work properly
theneva fa4ba45
--wip-- [skip ci]
theneva 7f70f94
it works
theneva 2c8a4ed
clean up
theneva 3832790
remove console.log statements
theneva e909d4a
remove more debug stuff
theneva 655b36f
minimize diff
theneva afa311d
revert package.json changes
theneva b6bce2d
simplify node version test util
theneva 76e3c10
test all cases & make it work when passing (data, callback)
theneva 3591378
pull tests into describe block
theneva 0a5d51a
extract node version support stuff to variable
theneva f93f995
switch from call to apply
theneva 6e88688
mutate arguments to Make It Work
theneva 647edce
update
theneva 94a85cd
what
theneva c9abb7e
wat
theneva 5fce3e3
still WIP
theneva d4856f8
clean up
theneva a5b85af
don't use .only
theneva 3a5df79
don't overwrite second argument if it isn't encoding
theneva a578c50
don't assert or call done if not required
theneva File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we pass
endArgs
to the original_end()
, we need to keep it up to date. I believe thechunk
is reassigned here because Node 0.8'send()
only accepts aBuffer
?Mutating a function's
arguments
feels pretty bad, but it's by far the most elegant solution I came up with.I'm not sure if this warrants a comment in the code.