Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jan 2005 21:34:37 +1100 (EST)
From:      Edwin Groothuis <edwin@mavetju.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/76134: fetch(1) doesn't like 401 errors with -A
Message-ID:  <20050112103437.23250610F@k7.mavetju>
Resent-Message-ID: <200501121040.j0CAeJKK024377@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         76134
>Category:       bin
>Synopsis:       fetch(1) doesn't like 401 errors with -A
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 12 10:40:19 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Edwin Groothuis
>Release:        FreeBSD 5.2.1-RELEASE i386
>Organization:
-
>Environment:
FreeBSD mag.barnet.com.au 5.3-RELEASE FreeBSD 5.3-RELEASE #2: Mon Dec 13 13:18:03 EST 2004     root@mag.barnet.com.au:/usr/src/sys/i386/compile/mag  i386

-r-xr-xr-x  1 root  wheel  17116 Nov  5 12:26 /usr/bin/fetch
-r--r--r--  1 root  wheel  44252 Nov  5 12:24 /usr/lib/libfetch.so.3

(straight from the 5.3 mini ISO)

>Description:

	When running fetch with the -A parameter (Do not automatically
	follow ``temporary'' (302) redirects.) and receiving an 401
	status (Authentication required), fetch doesn't automatically
	retry.

>How-To-Repeat:

$ HTTP_AUTH='basic:*:I accept www.opensource.org/licenses/cpl:.' /usr/bin/fetch -vvvARr -S 301873 http://www.research.att.com/~gsf/download/tgz/INIT.2004-12-25.tgz
scheme:   [http]
user:     []
password: []
host:     [www.research.att.com]
port:     [0]
document: [/~gsf/download/tgz/INIT.2004-12-25.tgz]
---> www.research.att.com:80
looking up www.research.att.com
connecting to www.research.att.com:80
requesting http://www.research.att.com/~gsf/download/tgz/INIT.2004-12-25.tgz
>Fix:
	-
>Release-Note:
>Audit-Trail:
>Unformatted:
 >>> GET /~gsf/download/tgz/INIT.2004-12-25.tgz HTTP/1.1
 >>> Host: www.research.att.com
 >>> User-Agent: fetch libfetch/2.0
 >>> Range: bytes=7168-
 >>> Connection: close
 >>> 
 <<< HTTP/1.1 401 Authorization Required
 server requires authorization
 <<< Date: Wed, 12 Jan 2005 10:31:05 GMT
 <<< Server: Apache/1.3.27 (Unix) mod_perl/1.27 mod_ssl/2.8.12 OpenSSL/0.9.6g
 <<< WWW-Authenticate: Basic realm="(using a name and password to access downloads binds you to use the software only in accordance with the Common Public License)"
 <<< Connection: close
 <<< Transfer-Encoding: chunked
 <<< Content-Type: text/html
 <<< 
 fetch: http://www.research.att.com/~gsf/download/tgz/INIT.2004-12-25.tgz: Unauthorized
 
 
 And now without the -A:
 
 $ HTTP_AUTH='basic:*:I accept www.opensource.org/licenses/cpl:.' /usr/bin/fetch -vvvRr -S 301873 http://www.research.att.com/~gsf/download/tgz/INIT.2004-12-25.tgz
 scheme:   [http]
 user:     []
 password: []
 host:     [www.research.att.com]
 port:     [0]
 document: [/~gsf/download/tgz/INIT.2004-12-25.tgz]
 ---> www.research.att.com:80
 looking up www.research.att.com
 connecting to www.research.att.com:80
 requesting http://www.research.att.com/~gsf/download/tgz/INIT.2004-12-25.tgz
 >>> GET /~gsf/download/tgz/INIT.2004-12-25.tgz HTTP/1.1
 >>> Host: www.research.att.com
 >>> User-Agent: fetch libfetch/2.0
 >>> Range: bytes=7168-
 >>> Connection: close
 >>> 
 <<< HTTP/1.1 401 Authorization Required
 server requires authorization
 <<< Date: Wed, 12 Jan 2005 10:31:28 GMT
 <<< Server: Apache/1.3.27 (Unix) mod_perl/1.27 mod_ssl/2.8.12 OpenSSL/0.9.6g
 <<< WWW-Authenticate: Basic realm="(using a name and password to access downloads binds you to use the software only in accordance with the Common Public License)"
 <<< Connection: close
 <<< Transfer-Encoding: chunked
 <<< Content-Type: text/html
 <<< 
 ---> www.research.att.com:80
 looking up www.research.att.com
 connecting to www.research.att.com:80
 requesting http://www.research.att.com/~gsf/download/tgz/INIT.2004-12-25.tgz
 >>> GET /~gsf/download/tgz/INIT.2004-12-25.tgz HTTP/1.1
 >>> Host: www.research.att.com
 usr: [I accept www.opensource.org/licenses/cpl]
 pwd: [.]
 >>> Authorization: Basic SSBhY2NlcHQgd3d3Lm9wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL2NwbDou
 >>> User-Agent: fetch libfetch/2.0
 >>> Range: bytes=7168-
 >>> Connection: close
 >>> 
 <<< HTTP/1.1 206 Partial Content
 <<< Date: Wed, 12 Jan 2005 10:31:30 GMT
 <<< Server: Apache/1.3.27 (Unix) mod_perl/1.27 mod_ssl/2.8.12 OpenSSL/0.9.6g
 <<< Last-Modified: Wed, 29 Dec 2004 03:25:30 GMT
 last modified: [2004-12-29 03:25:30]
 <<< ETag: "5d37bf1-49b31-41d223aa"
 <<< Accept-Ranges: bytes
 <<< Content-Length: 294705
 content length: [294705]
 <<< Content-Range: bytes 7168-301872/301873
 content range: [7168-301872/301873]
 <<< Connection: close
 <<< Content-Type: application/octet-stream
 <<< 
 offset 7168, length 294705, size 301873, clength 294705
 local size / mtime: 7168 / 1104290730
 remote size / mtime: 301873 / 1104290730
 Receiving INIT.2004-12-25.tgz (301873 bytes): 11%
 
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050112103437.23250610F>