Comments (5)
I can add this behavior fairly easily but I'm wondering if this is how cNTLM or NTLMaps work on behalf of HTTP/1.0 clients. I guess considering that Px is having the conversation with the NTLM server, it would have to keep the connection alive for the conversation to happen.
Also, curious if the client is expected to do anything special to close the connection and if Px needs to do that as well on behalf of the client.
from px.
px itself closes the connection after it receives the response from real proxy. So it does not keep the connection open on behalf of the client.
Actually the sequence looks as follows:
# proxy px client
1 request
<------
2 request & keep-alive & Proxy-Authenticate
<------
3 407 & keep-alive & Proxy-Authenticate
------>
4 request & keep-alive & Proxy-Authenticate
<------
5 response
------->
6 [ closing connection ]
I actually checked what cntlm does. If I do the failing case (curl --proxy 127.0.0.1:3128 --proxy-header Proxy-Connection: -v -0 http://some.server.de
) and sniff the connection between cntlm and the proxy I can see the Proxy-Connection: keep-alive
header in both step 2 and 4.
from px.
So just to confirm, the code change required is as follows:-
if connection == "HTTP/1.0" and keepAliveHeader == False:
Send keep-alive on behalf of client
By the way, which HTTP client are you using that's using 1.0 without the header?
from px.
I've checked in a fix for this issue - can you please verify that it works as expected for you? I couldn't reproduce the failure with my NTLM proxy which didn't care that keep-alive was missing for an HTTP/1.0 client.
from px.
Just posted v0.3.0 so marking this as closed.
from px.
Related Issues (20)
- import problem on macos pip install HOT 1
- Px Proxy Issue on Windows HOT 3
- "PROXY" prefix in web.pac HOT 2
- get_destination for local server not using direct connection since 0.8.0 HOT 8
- `_quickjs.JSException: InternalError: Python call failed.` with PAC file HOT 1
- Exit automatically if log = 0 HOT 4
- PAC file encoding HOT 11
- IPv6 connect support HOT 2
- have an option to launch in the background HOT 1
- px status command HOT 3
- Px related issues when other applocations make localhost request HOT 2
- hostonly and WSL2 HOT 7
- `curl: (56) Proxy CONNECT aborted` error with px 0.8 when using curl.exe HOT 7
- 'Requires libcurl' when using 'tools.py --libcurl' HOT 1
- Installing fails with: Invalid numerical argument /Werror=incompatible-pointer-types. HOT 1
- px.exe 18 security vendors and no sandboxes flagged this file as malicious HOT 25
- Support for macOS Ventura 13.4? HOT 4
- Spaces in PAC proxy list cause blank proxies to be added HOT 2
- Is there a way to restart the proxy (Windows)? HOT 7
- Windows Defender "Threat Found" display HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from px.