bugGNU Wget - Bugs: bug #45443, http_proxy variable should also...

 
 

bug #45443: http_proxy variable should also work for capitalized HTTP_PROXY

Submitter:  Noël Köthe <nok>
Submitted:  Tue 30 Jun 2015 09:09:43 AM UTC
   
 
Category:  User Interface Severity:  3 - Normal
Priority:  5 - Normal Status:  Wont Fix
Privacy:  Public Assigned to:  rockdaboot
Originator Name:  Open/Closed:  Closed
Release:  1.16.3 Operating System:  GNU/Linux
Reproducibility:  Every Time Fixed Release:  None
Planned Release:  None Regression:  None
Work Required:  None Patch Included:  No
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 14 Aug 2015 08:58:58 AM UTC, comment #1: 

I cite Daniel Stenberg (curl maintainer/developer) from the mailing list bug-wget@gnu.org, Tue, 30 Jun 2015 11:20:28 +0200 (CEST):

"The reason some tools don't accept "HTTP_PROXY" and only "http_proxy" is that the CGI interface from back in the old days provide headers from the incoming request to the CGI program prefixed with "HTTP_".

Thus, running a CGI script from a server, an incoming "Proxy:" header (which normally doesn't do anything) would be sent to the program as "HTTP_PROXY", leading to confusions or in the worst case some sort of attack.

The CGI interface is an ancient thing, probably boardering to extinction. Still it is out there and some such CGIs probably use wget.

Incidently, curl also only accepts the lower case version of this environment variable and I believe it goes for some other related tools as well."

Tim Ruehsen <rockdaboot>
Group administrator
Tue 30 Jun 2015 09:09:43 AM UTC, original submission:  

Hello,

using the lowercase environment proxy variables works as documented:

# http_proxy=http://doesnotexist wget gnu.org
--2015-06-30 10:58:36--  http://gnu.org/
Resolving doesnotexist (doesnotexist)... failed: Name or service not known.
wget: unable to resolve host address 'doesnotexist'

but using it with capitalized variables they are ignored:

# HTTP_PROXY=http://doesnotexist wget gnu.org
--2015-06-30 11:07:42--  http://gnu.org/
Resolving gnu.org (gnu.org)... 208.118.235.148
Connecting to gnu.org (gnu.org)|208.118.235.148|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.gnu.org/ [following]
--2015-06-30 11:07:42--  http://www.gnu.org/
Resolving www.gnu.org (www.gnu.org)... 208.118.235.148, 2001:4830:134:3::a
Reusing existing connection to gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: 'index.html'

index.html              [  <=>                ]  23.12K  63.1KB/s   in 0.4s  

2015-06-30 11:07:43 (63.1 KB/s) - 'index.html' saved [23677]

Variables are often written capitalized and they should not be ignored by wget.

Thank you.

https://bugs.debian.org/790523

Noël Köthe <nok>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by darnir (Updated the item)
  • -email is unavailable- added by rockdaboot (Posted a comment)
  • -email is unavailable- added by nok (Submitted the item)
  • -email is unavailable- added by nok
  •  

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-08-15 darnir Open/ClosedOpen Closed
    2015-08-14 rockdaboot StatusNone Wont Fix
        Assigned toNone rockdaboot
    2015-06-30 nok Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code