-
Notifications
You must be signed in to change notification settings - Fork 193
Enable managerModifyRequest to modify redirectCount #208
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
Conversation
I'm currently halfway through a refactoring for http-client 0.5. It doesn't exactly simplify this bit of logic, but it does touch on it. Would you mind holding off until that refactoring is complete and then reapplying this PR to the new master? |
Yes, sounds good. |
Alright, I've merged to master. |
a3bfc7b
to
67e1252
Compare
I've rebased my branch and changed it, adding some more tests and doing things slightly differently. I'd appreciate any feedback. There's also a few questions where I don't know how we want
cc: @snoyberg |
Looks OK to me. I agree that the competing features have made things a little convoluted here. How about taking a simplification pass like so:
|
013f56b
to
9116b86
Compare
@snoyberg: I've tried to implement your suggestion and rebased on current |
9116b86
to
11a9a62
Compare
@snoyberg: Fixed the travis failures. |
Thanks! |
Thanks for merging and the release! |
This changes the behavior of
httpRaw
andhttpRaw'
: They will not applymModifyRequest
on given requests. (Since they are only exported inInternal
modules I hope this is ok.)I'm not very happy with this code (apart from the test case). How the request is modified has gotten very confusing. This is also very visible in the confusing non-informative names for the requests (
req0
,req
,req'
,req''
and nowinputReq
). I'm not very familiar with this code internally, so I'm not sure how to refactor things without breaking other features. I may look into this in the next days, but any pointers (or code) would be appreciated.One more concrete question: Does it even makes sense that
httpRaw'
returns aRequest
if it doesn't applymModifyRequest
to it anymore?