Skip to content

[LocalWebserver] proxy env lowercase #13577

Closed
@damianz5

Description

@damianz5

HTTP_PROXY and HTTPS_PROXY envs should be lowercase.

https://ec.haxx.se/usingcurl/usingcurl-proxies#http_proxy-in-lower-case-only

https://github.com/curl/curl/blob/f762fec323f36fd7da7ad6eddfbbae940ec3229e/docs/libcurl/libcurl-env.3#L37

curl/curl@cb4e2be#diff-58b4cd8fc3c3f6b7a8cd8294d6040174R57

Pull request: #13578

tests:

broken - env is ignored

HTTP_PROXY=http://127.0.0.1:7081 curl 127.0.0.1 -vvv

*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 80 (#0)
> GET / HTTP/1.1
> Host: 127.0.0.1
> User-Agent: curl/7.64.1
> 
< HTTP/1.1 200 OK
...
< 
page response

works:

http_proxy=http://127.0.0.1:7080 curl 127.0.0.1 -vvv

* Uses proxy env variable http_proxy == 'http://127.0.0.1:7080'
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 7080 (#0)
> GET http://127.0.0.1/ HTTP/1.1
> Host: 127.0.0.1
> User-Agent: curl/7.64.1
> 
< HTTP/1.1 200 OK
...
< 
page response

also works

curl -x http://127.0.0.1:7080 127.0.0.1 -vvv

*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 7080 (#0)
> GET http://127.0.0.1/ HTTP/1.1
> Host: 127.0.0.1
> User-Agent: curl/7.64.1
> 
< HTTP/1.1 200 OK
...
< 
page response

Metadata

Metadata

Assignees

No one assigned

    Labels

    hasPRA Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions