From nobody@FreeBSD.org  Fri Nov 23 19:32:03 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id A1CCD37B416
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 23 Nov 2001 19:32:02 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id fAO3W2h24108;
	Fri, 23 Nov 2001 19:32:02 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200111240332.fAO3W2h24108@freefall.freebsd.org>
Date: Fri, 23 Nov 2001 19:32:02 -0800 (PST)
From: Christoph Weber-Fahr <christoph.weber-fahr@arcor.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: /stand/sysinstall breaks when installing across Cacheflow HTTP proxies
X-Send-Pr-Version: www-1.0

>Number:         32238
>Category:       bin
>Synopsis:       /stand/sysinstall breaks when installing across Cacheflow HTTP proxies
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    matusita
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 23 19:40:01 PST 2001
>Closed-Date:    Sat Dec 1 07:01:01 PST 2001
>Last-Modified:  Sat Dec 01 07:03:03 PST 2001
>Originator:     Christoph Weber-Fahr
>Release:        4.4-RELEASE
>Organization:
>Environment:
FreeBSD xxxxxxxx 4.4-RELEASE FreeBSD 4.4-RELEASE #1: Tue Nov 20 23:00
:49 CET 2001     wefa@xxxxxxxxx:/usr/src/sys/compile/XXXX  i386
>Description:
Apparently Cacheflow Webcaches burp (*) when getting a HEAD-request for a ftp:// url. Since sysinstall checks the install site by issuing HEAD requests when using a HTTP proxy, it refuses to install

(*) "burp" means closing the connection immediately without answer. Yes, I know that's completely against any rfc, but the machines are out there

>How-To-Repeat:
wefa@xxxxx 3:54 [~] telnet xx.xx.xx.xxx 8000
Trying xx.xx.xx.xx...
Connected to wwwproxy-ffm....
Escape character is '^]'.
HEAD ftp://ftp.de.freebsd.org/pub/ HTTP/1.0

Connection closed by foreign host.
wefa@xxxxx 3:55 [~]

(if you want to test this I can give you access to such 
a machine upon request)
>Fix:
Replace HEAD with GET. Tested that, works.

--- /usr/src/release/sysinstall/http.c.orig     Sat Nov 24 05:00:07 2001
+++ /usr/src/release/sysinstall/http.c  Sat Nov 24 05:21:18 2001
@@ -57,9 +57,9 @@
        return TRUE;
     }

     msgNotify("Checking access to\n %s", variable_get(VAR_HTTP_PATH));
-    sprintf(req,"HEAD %s/ HTTP/1.0\r\n\r\n", variable_get(VAR_HTTP_PATH));
+    sprintf(req,"GET %s/ HTTP/1.0\r\n\r\n", variable_get(VAR_HTTP_PATH));
     write(s,req,strlen(req));
 /*
  *  scan the headers of the response
  *  this is extremely quick'n dirty

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: matusita 
State-Changed-When: Sat Nov 24 09:41:26 PST 2001 
State-Changed-Why:  
In src/usr.sbin/sysinstall/http.c rev 1.4, 'GET' method was 
changed to 'HEAD' request, according to the associated PR: 21449. 

I've sent the previous PR submitter why this change is required. 


Responsible-Changed-From-To: freebsd-bugs->matusita 
Responsible-Changed-By: matusita 
Responsible-Changed-When: Sat Nov 24 09:41:26 PST 2001 
Responsible-Changed-Why:  
I'm willing to handle this. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32238 

From: Makoto Matsushita <matusita@jp.freebsd.org>
To: christoph.weber-fahr@arcor.de, p@i609.hadiko.de
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: bin/32238: /stand/sysinstall breaks when installing across
 Cacheflow HTTP proxies
Date: Sun, 25 Nov 2001 02:40:57 +0900

 > Apparently Cacheflow Webcaches burp (*) when getting a HEAD-request
 > for a ftp:// url. Since sysinstall checks the install site by
 > issuing HEAD requests when using a HTTP proxy, it refuses to install
 
 This part uses 'GET' request to verify, but PR: 21449, and its
 associated commit, http.c rev 1.4, changes to 'HEAD'.
 
 I can't read from this PR that why s/GET/HEAD/ change was occured, but
 I'm afraid that there are some meanings and can't be changed back to
 'GET'.  The PR: 21449 submitter, p@i609.hadiko.de, would you please
 explain the details?
 
 -- -
 Makoto `MAR' Matsushita

From: Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
To: Makoto Matsushita <matusita@jp.freebsd.org>
Cc: christoph.weber-fahr@arcor.de, p@i609.hadiko.de,
	freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: bin/32238: /stand/sysinstall breaks when installing across Cacheflow HTTP proxies
Date: Sat, 24 Nov 2001 19:24:21 +0100

 On Sun, Nov 25, 2001 at 02:40:57AM +0900, Makoto Matsushita wrote:
 > 
 > > Apparently Cacheflow Webcaches burp (*) when getting a HEAD-request
 > > for a ftp:// url. Since sysinstall checks the install site by
 > > issuing HEAD requests when using a HTTP proxy, it refuses to install
 > 
 > This part uses 'GET' request to verify, but PR: 21449, and its
 > associated commit, http.c rev 1.4, changes to 'HEAD'.
 > 
 > I can't read from this PR that why s/GET/HEAD/ change was occured, but
 > I'm afraid that there are some meanings and can't be changed back to
 > 'GET'.  The PR: 21449 submitter, p@i609.hadiko.de, would you please
 > explain the details?
 
 Sorry, I should have mentioned this in the PR: this request only
 checks whether host and path are ok and doesn't need the file's
 content.  Therefore I thought a 'HEAD' would be more appropriate
 than a 'GET' and possibly easier on the server's resources.
 Of course, it doesn't make much difference compared to a complete
 FreeBSD install. :-)
 
 Changing back to 'GET' is absolutely ok.
 
 Bye, Philipp

From: Makoto Matsushita <matusita@jp.freebsd.org>
To: philipp.mergenthaler@stud.uni-karlsruhe.de
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: bin/32238: /stand/sysinstall breaks when installing across
 Cacheflow HTTP proxies
Date: Sun, 25 Nov 2001 04:30:19 +0900

 philipp.mergenthaler>  Of course, it doesn't make much difference
 philipp.mergenthaler>  compared to a complete FreeBSD install. :-)
 philipp.mergenthaler>  
 philipp.mergenthaler>  Changing back to 'GET' is absolutely ok.
 
 Glad to hear that.  Thank you!
 
 I would like to commit this PR's patch, but http.c lacks copyright
 notice. I believe you are the person who submited PR: 11316; would you
 please send me your (BSD-style) copyright notice, just like other
 sysinstall source codes?  I want to include your copyright notice, add
 FreeBSD: CVSID, then commit it.
 
 -- -
 Makoto `MAR' Matsushita

From: Makoto Matsushita <matusita@jp.freebsd.org>
To: freebsd-gnats-submit@FreeBSD.ORG
Cc: philipp.mergenthaler@stud.uni-karlsruhe.de
Subject: Re: bin/32238: /stand/sysinstall breaks when installing across
 Cacheflow HTTP proxies
Date: Sun, 25 Nov 2001 09:54:22 +0900

 philipp.mergenthaler>  Of course, it doesn't make much difference
 philipp.mergenthaler>  compared to a complete FreeBSD install. :-)
 philipp.mergenthaler>  
 philipp.mergenthaler>  Changing back to 'GET' is absolutely ok.
 
 Glad to hear that.  I've applied a patch for changing back to 'GET' for
 HEAD branch.  RELENG_4 will be changed in a week later.
 
 -- -
 Makoto `MAR' Matsushita
State-Changed-From-To: feedback->closed 
State-Changed-By: matusita 
State-Changed-When: Sat Dec 1 07:01:01 PST 2001 
State-Changed-Why:  
Patch commited to src/usr.sbin/sysinstall/http.c rev 1.6 and 
src/release/sysinstall/http.c rev 1.2.2.4.  Thanks! 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32238 
>Unformatted:
