Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

Dropping "CONNECT" request instead of 401 when auth is required #93

Open
zsoltm opened this issue Aug 5, 2016 · 0 comments · May be fixed by #100
Open

Dropping "CONNECT" request instead of 401 when auth is required #93

zsoltm opened this issue Aug 5, 2016 · 0 comments · May be fixed by #100

Comments

@zsoltm
Copy link

zsoltm commented Aug 5, 2016

I found a strange behaviour while handling CONNECT requests when authentication is enabled. If the client does not provide credentials the connection is just simply closed instead of responding with 401 and demanding (basic) authentication as it happens with regular proxy req's.

Could be tested easily:

CONNECT test.service:14442 HTTP/1.1
Host: test.service
Connection: keep-alive

Connection closed by foreign host.

... whereas:

CONNECT test.service:14442 HTTP/1.1
Host: test.service
Connection: keep-alive
Proxy-Authorization: Basic cHJveHk6dGVzdA==

HTTP/1.1 200 Tunnel established

Non-tunneling requests does it correctly:

GET http://test.service:14142/ HTTP/1.1
Host: test.service
Connection: keep-alive

HTTP/1.1 407 Proxy authentication required
Proxy-Authenticate: Basic realm="proxy-auth"
@zsoltm zsoltm changed the title Tunneling with auth enabled Dropping "CONNECT" connections instead of 401 when auth is required Aug 5, 2016
@zsoltm zsoltm changed the title Dropping "CONNECT" connections instead of 401 when auth is required Dropping "CONNECT" request instead of 401 when auth is required Aug 5, 2016
@atykhyy atykhyy linked a pull request Dec 26, 2017 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant