-
-
Notifications
You must be signed in to change notification settings - Fork 807
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
Initial start on HTTP tunnel proxies #223
Conversation
@@ -178,7 +178,8 @@ def merge_headers( | |||
) | |||
except HTTPError as exc: | |||
# Add the original request to any HTTPError | |||
exc.request = request | |||
if exc.request is None: |
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.
This is to not replace the request
property on a ProxyError
which is different than the original request.
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.
I'd be OK with freezing that bit of information as a code comment. :-)
Crackin' stuff!
It'll probably be easier to fully review once |
What's the proposed API for this once it's linked up to the Client? |
After I implement the two separate proxy types (forward and tunnel) the interface for clients will be the same as in Requests:
or if you need more control:
The default |
From an API point of view I think that having just |
You're right, I'll merge the two. What are your thoughts on getting the two separate implementations committed and then merging along with wiring up the Client as it's own PR? Makes it easier to test the behavior of the specific proxy modes. |
Probably would be okay with that since the dispatcher interface is documented already, yeah. We should probably start exanding out the "Advanced" section of the docs tho. |
Closed in favor of #259 |
Closes #201. This is my initial stab at implement HTTP tunnel proxy as a Dispatcher. Will need to implement the
proxies
argument for theClient
to match Requests.I'm wondering what the best way to test this implementation would be.