From nobody  Tue Jan 21 03:44:20 1997
Received: (from nobody@localhost)
          by freefall.freebsd.org (8.8.4/8.8.4) id DAA14861;
          Tue, 21 Jan 1997 03:44:20 -0800 (PST)
Message-Id: <199701211144.DAA14861@freefall.freebsd.org>
Date: Tue, 21 Jan 1997 03:44:20 -0800 (PST)
From: Nakai@Mlab.t.u-tokyo.ac.jp
To: freebsd-gnats-submit@freebsd.org
Subject: fetch command fail to get file
X-Send-Pr-Version: www-1.0

>Number:         2547
>Category:       bin
>Synopsis:       fetch command fail to get file
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 21 03:50:01 PST 1997
>Closed-Date:    Thu Jul 23 21:47:49 PDT 1998
>Last-Modified:  Thu Jul 23 21:48:35 PDT 1998
>Originator:     Yukihiro Nakai
>Release:        3.0-970118-SNAP
>Organization:
University of Tokyo
>Environment:
FreeBSD PyroPolis.t.u-tokyo.ac.jp 3.0-970118-SNAP FreeBSD 3.0-970118-SNAP #0: Sat Jan 18 13:26:12 GMT 1997     jkh@time.cdrom.com:/usr/src/sys/compile/GENERIC  i386
>Description:
'fetch' command fail to get some file.
Please tell me how to avoid this problem.
>How-To-Repeat:
Do this command

fetch http://www.power.co.jp/tm/tanaka/new-osaka.tar.gz

and you'll find this message and fail.
tm/tanaka/new-osaka.tar.gz fetching failed, header so far:
HTTP/1.0 406 IuWFNg
Content-Type: text/html

<body><h1>HTTP/1.0 406 IuWFNg
</h1></body>

>Fix:

>Release-Note:
>Audit-Trail:

From: Bill Fenner <fenner@parc.xerox.com>
To: freebsd-gnats-submit@freebsd.org, Nakai@mlab.t.u-tokyo.ac.jp
Cc:  Subject: Re: bin/2547: fetch command fail to get file
Date: Tue, 21 Jan 1997 09:38:32 PST

 This is because fetch doesn't supply an "Accept:" header, and
 Microsoft IIS appears to take the lack of an "Accept:" header
 as 'I want no types of data' instead of 'I want all types of data'.
 (The 406 error says "I don't have the type of data you want".  Unless
 the characters after the 406 are japanese, then it's probably a bug in
 IIS that prints garbage after a 406 error).
 
 Of course, RFC2068 says
 
    If no Accept header field is present, then it is assumed that the
    client accepts all media types.
 
 but we can't expect Microsloth to care.  The fix, annoying as it
 may be, is probably to make fetch say "Accept: */*" as part of its
 HTTP request.
 
   Bill
State-Changed-From-To: open->closed 
State-Changed-By: fenner 
State-Changed-When: Thu Jul 23 21:47:49 PDT 1998 
State-Changed-Why:  
Accept: header added in wollman's fetch revamp in 
Jan 1997. 
>Unformatted:
