From burg@vdb.is.ge.com  Wed Feb  5 12:47:07 1997
Received: from ns.ge.com (ns.ge.com [192.35.39.24])
          by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA10723
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 5 Feb 1997 12:47:02 -0800 (PST)
Received: from thomas.ge.com (thomas.ge.com [3.47.28.21]) by ns.ge.com (8.8.4/8.7.3) with ESMTP id PAA16441 for <FreeBSD-gnats-submit@freebsd.org>; Wed, 5 Feb 1997 15:45:01 -0500 (EST)
Received: from vdb.is.ge.com ([3.228.100.2]) by thomas.ge.com (8.8.4/8.7.5) with ESMTP id PAA28212 for <FreeBSD-gnats-submit@freebsd.org>; Wed, 5 Feb 1997 15:47:52 -0500 (EST)
Received: (from burg@localhost) by vdb.is.ge.com (8.8.5/8.6.12) id VAA01307; Wed, 5 Feb 1997 21:43:43 +0100 (MET)
Message-Id: <199702052043.VAA01307@vdb.is.ge.com>
Date: Wed, 5 Feb 1997 21:43:43 +0100 (MET)
From: burg@is.ge.com
Reply-To: burg@is.ge.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: fetch and proxies
X-Send-Pr-Version: 3.2

>Number:         2670
>Category:       bin
>Synopsis:       fetch fails with HTTP_PROXY
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb  5 12:50:07 PST 1997
>Closed-Date:    Tue Apr 14 12:33:54 PDT 1998
>Last-Modified:  Tue Apr 14 12:34:05 PDT 1998
>Originator:     Dick van den Burg
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
>Environment:
 Current as of Feb 3
 HTTP_PROXY=http-proxy.euro.ge.com:80
 netscape proxy on a BSDI system.

>Description:

 1) fetch decodes the proxy port number incorrectly resulting in 
    fetch: `http-proxy.euro.ge.com:80': invalid port number

 2) the GET has a leading / that should not be there.
    GET /http://www.xemacs.org/index.html    in stead of
    GET http://www.xemacs.org/index.html

>How-To-Repeat:


>Fix:
	
*** http.c      Wed Feb  5 21:34:32 1997
--- /usr/src/usr.bin/fetch/http.c       Fri Jan 31 20:55:50 1997
***************
*** 415,421 ****
          } while(0)
  
  retry:
!       addstr(iov, n, "GET ");
        addstr(iov, n, https->http_remote_request);
        addstr(iov, n, " HTTP/1.1\r\n");
        /*
--- 415,421 ----
          } while(0)
  
  retry:
!       addstr(iov, n, "GET /");
        addstr(iov, n, https->http_remote_request);
        addstr(iov, n, " HTTP/1.1\r\n");
        /*
*** util.c      Wed Feb  5 20:11:43 1997
--- /usr/src/usr.bin/fetch/util.c       Sun Feb  2 10:16:37 1997
***************
*** 165,171 ****
  
        colon = strchr(s, ':');
        if (colon != 0) {
!           /*          colon++; */
                errno = 0;
                ul = strtoul(colon + 1, &ep, 10);
                if (*ep != '\0' || colon[1] == '\0' || errno != 0
--- 165,171 ----
  
        colon = strchr(s, ':');
        if (colon != 0) {
!               colon++;
                errno = 0;
                ul = strtoul(colon + 1, &ep, 10);
                if (*ep != '\0' || colon[1] == '\0' || errno != 0

>Release-Note:
>Audit-Trail:

From: Garrett Wollman <wollman@lcs.mit.edu>
To: burg@is.ge.com
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: bin/2670: fetch and proxies
Date: Wed, 5 Feb 1997 17:02:34 -0500

 <<On Wed, 5 Feb 1997 21:43:43 +0100 (MET), burg@is.ge.com said:
 
 >  1) fetch decodes the proxy port number incorrectly resulting in 
 >     fetch: `http-proxy.euro.ge.com:80': invalid port number
 
 >  2) the GET has a leading / that should not be there.
 >     GET /http://www.xemacs.org/index.html    in stead of
 >     GET http://www.xemacs.org/index.html
 
 You're right.  I will try to fix these tomorrow.  (Your patch for (2)
 was too simplistic and doesn't work for talking to an HTTP/1.0 server
 which is not a proxy.)
 
 -GAWollman
 
 --
 Garrett A. Wollman   | O Siem / We are all family / O Siem / We're all the same
 wollman@lcs.mit.edu  | O Siem / The fires of freedom 
 Opinions not those of| Dance in the burning flame
 MIT, LCS, ANA, or NSA|                     - Susan Aglukark and Chad Irschick
State-Changed-From-To: open->feedback 
State-Changed-By: wollman 
State-Changed-When: Tue Feb 11 12:46:18 PST 1997 
State-Changed-Why:  
Should be fixed by rev. 1.4 of http.c. 
State-Changed-From-To: feedback->closed 
State-Changed-By: phk 
State-Changed-When: Tue Apr 14 12:33:54 PDT 1998 
State-Changed-Why:  
timed out 
>Unformatted:
