Skip to content
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

hackney doesn't work with proxies configured to accept GET (no CONNECT) requests #76

Closed
brigadier opened this issue Jan 6, 2014 · 6 comments
Assignees

Comments

@brigadier
Copy link
Contributor

At the moment hackney always makes CONNECT request when working through proxy. In fact, most proxies that can be found on Internet don't accept CONNECT, they work with GET only. For CONNECT they reply "403 forbidden". http://en.wikipedia.org/wiki/HTTP_tunnel - "HTTP Tunneling without using CONNECT" section.

For example 202.107.222.50:80 (not sure if it will work at the time when you read this issue though) works fine when set in browser but returns 403 when used in hackney:request. Difference in connection method can be seen in Wireshark.

It would be nice to add an option to use such proxies and have a way to specify which method should be used - CONNECT or GET.

@ghost ghost assigned benoitc Jan 12, 2014
@qrilka
Copy link
Contributor

qrilka commented Feb 11, 2014

And it is quite strange that hackney supports the same options proxy/proxy_auth as httpc without supporting Proxy-Authorization header

@benoitc
Copy link
Owner

benoitc commented Feb 11, 2014

@qrilka not sure it's strange.... Probably just forgot that header existed. Anyway I just setup different proxy there and will try to reproduce along the day. Thanks for the feedback :)

@qrilka
Copy link
Contributor

qrilka commented Feb 11, 2014

@benoitc actually I was thinking about switching from httpc to hackney and they have quite similar API but somwhat different behaviour, and that was somewhat suprising for me.
Currently I use ibrowse for the case when httpc does not suite our needs (for the moment it's just 1 test case: httpc does not have a way to suppress retries after Retry-After being received) but we have plans to test out whether httpc isn't optimal for other usecases.

@benoitc
Copy link
Owner

benoitc commented Feb 11, 2014

@qrilka i will add the support of such header in the week. I will add it once #78 is in place.

@qrilka
Copy link
Contributor

qrilka commented Feb 11, 2014

Thanks, but it's not a header - it's a different proxy connection method (using GET and not CONNECT) which could include Proxy-Authorization header

@benoitc
Copy link
Owner

benoitc commented Feb 11, 2014

On Tue, Feb 11, 2014 at 10:17 AM, Kirill Zaborsky
[email protected]:

Thanks, but it's not a header - it's a different proxy connection method
(using GET and not CONNECT) which could include Proxy-Authorization header

yup i'ts not only the header. I am testing what could be done right now :)

--
Reply to this email directly or view it on GitHubhttps://github.com//issues/76#issuecomment-34737407
.

@benoitc benoitc closed this as completed in a21e880 Mar 2, 2014
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

No branches or pull requests

3 participants