Repository navigation
http: improves expect header handling - #4501
designfrontier wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Avoid the type-checking util.* functions in node core code.
There was a problem hiding this comment.
Thanks and done
ce42fcd to
25f7e6a
Compare
There was a problem hiding this comment.
Just a nit, but checking directly against undefined (req.headers.expect !== undefined) instead of using typeof is preferred, when compared to the rest of the code base.
There was a problem hiding this comment.
I appreciate the nit picks :-) should be fixed now
25f7e6a to
2343cb2
Compare
There was a problem hiding this comment.
Also while we're in here, EventEmitter.listenerCount() is deprecated, so we should just use self.listenerCount('checkContinue'); instead and similarly for the other event below.
There was a problem hiding this comment.
@mscdex There is one other use of the EventEmitter.listenerCount in the file. Should I update it as well, or just change it in this new code?
Not sure how tightly scoped y'all like to keep the PRs.
There was a problem hiding this comment.
Sure, I think that should be ok.
2343cb2 to
20db3fe
Compare
There was a problem hiding this comment.
we generally try to avoid explicitly calling process.exit() in tests. Could you instead just close the server (which should make the process exit on it's own)?
commented
Jan 4, 2016
|
Marking |
commented
Jan 4, 2016
|
Generally LGTM but @evanlucas is correct about not calling |
commented
Jan 4, 2016
|
I'll try and get that knocked out this evening or tomorrow morning. Thanks for the feedback |
99b615d to
e7d2033
Compare
commented
Jan 7, 2016
|
This should be ready to rock and roll now. Tests have been rewritten to use |
commented
Jan 7, 2016
commented
Jan 7, 2016
|
@designfrontier the linter is complaining.... looks like |
Now returns a 417 error status or allows for an event listener on the `checkExpectation` event. Before we were ignoring requests that had misspelled `100-continue` values for expect headers. This is a quick port of the work done here: nodejs/node-v0.x-archive#7132 by alFReD-NSH with surrounding discussion here: nodejs/node-v0.x-archive#4651 Also updates all the instances of the deprecated EventEmitter.listenerCount to the current self.listenerCount. Most of these were in the new code ported over but there was another legacy instance. Refs: nodejs#2403
e7d2033 to
810158c
Compare
commented
Jan 8, 2016
|
whoops eslint was acting up for me in sublime apparently. Fixed. |
commented
Jan 8, 2016
|
I think the other CI test failure is unrelated, but here goes again: https://ci.nodejs.org/job/node-test-pull-request/1166/ |
commented
Jan 12, 2016
|
Looks like it passed jenkins... anything else I need to do on this? |
commented
Jan 12, 2016
|
LGTM @nodejs/http |
commented
Jan 12, 2016
|
Seems OK |
commented
Jan 13, 2016
|
Landed in d755432 |
commented
Jan 18, 2016
|
Nice work @designfrontier! I believe this is your first commit in to core, if so, welcome on board! I hope you stick around and find other ways to contribute. |
commented
Jan 18, 2016
|
It is! I plan to stick around and keep grabbing ticket when I have spare
|
Now returns a 417 error status or allows for an event listener on
the
checkExpectationevent. Before we were ignoring requests thathad misspelled
100-continuevalues for expect headers.This is a quick port of the work done here:
nodejs/node-v0.x-archive#7132 by alFReD-NSH
with surrounding discussion here:
nodejs/node-v0.x-archive#4651
Refs: #2403