From edwin@mavetju.org  Wed Nov 21 16:46:59 2001
Return-Path: <edwin@mavetju.org>
Received: from topaz.mdcc.cx (topaz.mdcc.cx [212.204.230.141])
	by hub.freebsd.org (Postfix) with ESMTP id 737AC37B41A
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 21 Nov 2001 16:46:59 -0800 (PST)
Received: from k7.mavetju.org (topaz.mdcc.cx [212.204.230.141])
	by topaz.mdcc.cx (Postfix) with ESMTP id 31BA72B775
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 22 Nov 2001 01:46:55 +0100 (CET)
Received: by k7.mavetju.org (Postfix, from userid 1001)
	id 1F88C7A; Thu, 22 Nov 2001 11:46:48 +1100 (EST)
Message-Id: <20011122004648.1F88C7A@k7.mavetju.org>
Date: Thu, 22 Nov 2001 11:46:48 +1100 (EST)
From: Edwin Groothuis <edwin@mavetju.org>
Reply-To: Edwin Groothuis <edwin@mavetju.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: port-survey HTTP result 302 handling
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         32177
>Category:       ports
>Synopsis:       port-survey HTTP result 302 handling
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    fenner
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 21 16:50:01 PST 2001
>Closed-Date:    Sat Nov 24 09:37:09 PST 2001
>Last-Modified:  Sat Nov 24 09:37:40 PST 2001
>Originator:     Edwin Groothuis
>Release:        FreeBSD 4.4-RELEASE i386
>Organization:
-
>Environment:
System: FreeBSD k7.mavetju.org 4.4-RELEASE FreeBSD 4.4-RELEASE #2: Sat Nov 10 21:31:47 EST 2001 edwin@k7.mavetju.org:/usr/src/sys/compile/k7 i386


>Description:

On my website I have a renamed a couple of pages and adjusted the
error 404 script to redirect to the new page:

    [~] edwin@k7>telnet www.mavetju.org 80
    Trying 213.46.9.168...
    Connected to p6.mavetju.org.
    Escape character is '^]'.
    GET /unix/general.phtml HTTP/1.0
    Host: www.mavetju.org

    HTTP/1.0 302 Moved Temporarily
    Date: Thu, 22 Nov 2001 00:42:10 GMT
    Server: Apache/1.3.22 (Unix) Debian/GNU PHP/4.1.0RC1
    X-Powered-By: PHP/4.1.0RC1
    Location: /unix/general.php
    Content-Type: text/html; charset=iso-8859-1

In the log-files I then see:
    cache4.ihug.com.au - - [22/Nov/2001:01:41:38 +0100] "GET /unix/general.phtml HTTP/1.0" 302 0
    cache3.ihug.com.au - - [22/Nov/2001:01:41:43 +0100] "GET /unix/general.php HTTP/1.0" 200 2025

This morning I saw freefall.freebsd.org query the page which is in
a couple of ports:

freefall.freebsd.org - - [22/Nov/2001:01:02:43 +0100] "HEAD /unix/general.phtml HTTP/1.0" 302 0 "-" "Portsurvey/0.2 libwww-perl/5.50" 1 www.mavetju.org
freefall.freebsd.org - - [22/Nov/2001:01:02:43 +0100] "HEAD //unix//unix/general.php HTTP/1.0" 404 0 "-" "Portsurvey/0.2 libwww-perl/5.50" 0 www.mavetju.org

It got a redirection, but requested the wrong file.

I don't know if this is a problem in libwww-perl/5.50 or in Portsurvey/0.2.

>How-To-Repeat:

See above.

>Fix:

Should come from the maintainer of Portsurvey to start with.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->fenner 
Responsible-Changed-By: petef 
Responsible-Changed-When: Wed Nov 21 17:21:32 PST 2001 
Responsible-Changed-Why:  
Over to Bill "distfiles" fenner :) 

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

From: Bill Fenner <fenner@research.att.com>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: ports/32177: port-survey HTTP result 302 handling
Date: Sat, 24 Nov 2001 00:20:15 -0800

 Wonderful!  A new, different way in which web servers violate
 RFC2616.  This is an illegal "Location:" response (they are required
 to be fully qualified URLs), but I will work on updating the script
 to handle them.  You might also want to update your web server to
 return valid 302 replies.
 
   Bill
State-Changed-From-To: open->closed 
State-Changed-By: fenner 
State-Changed-When: Sat Nov 24 09:37:09 PST 2001 
State-Changed-Why:  
The port survey now handles both illegal relative Location: headers 
and illegal absolute Location: headers. 

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