Giter VIP home page Giter VIP logo

Comments (3)

leumasme avatar leumasme commented on May 18, 2024 1

Yup, that patch fixes the issue for me!

from httptoolkit-server.

pimterry avatar pimterry commented on May 18, 2024

After some investigation, it turns out that you are setting the envoirement variable http_proxy, but in code attempt to access it as HTTP_PROXY.

Technically, we're setting both, here:

'http_proxy': proxyUrl,
'HTTP_PROXY': proxyUrl,

That said, it totally makes sense to me that Windows collapses these into a single variable when it ignores case, and then that Node bug (thanks for filing that!) makes it case sensitive to the selected result.

I don't want to overcomplicate this (e.g. to handle all possible casings) since in theory the current approach is 'correct' (set both vars, read one of them, expect that to be set) and it seems there's a proper fix en route for the specific node bug anyway. For now, I've just added the simplest fix, which should resolve this for your specific Undici issue and also various other cases (e.g. global-agent reads HTTP_PROXY internally I think, which is presumably broken as well, though not actually crashing).

I've pushed that here: 0a3d0af. Can you give that a quick test and confirm it works for you?

from httptoolkit-server.

leumasme avatar leumasme commented on May 18, 2024

and it seems there's a proper fix en route for the specific node bug anyway.

Sadly it seems that the NodeJS team has decided to add this behavior to the docs instead of fixing it.
nodejs/node#49008
nodejs/node#48976 (review)

from httptoolkit-server.

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.