GithubHelp home page GithubHelp logo

Comments (5)

genotrance avatar genotrance commented on September 18, 2024

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.

holgerreif avatar holgerreif commented on September 18, 2024

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.

genotrance avatar genotrance commented on September 18, 2024

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.

genotrance avatar genotrance commented on September 18, 2024

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.

genotrance avatar genotrance commented on September 18, 2024

Just posted v0.3.0 so marking this as closed.

from px.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.