From tolik@www.tomsk.su  Fri Jul 25 02:06:11 1997
Received: from www.tomsk.su (www.tomsk.su [193.124.185.18])
          by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id CAA23535
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 25 Jul 1997 02:06:02 -0700 (PDT)
Received: (from tolik@localhost)
	by www.tomsk.su (8.8.5/8.8.5) id RAA16942;
	Fri, 25 Jul 1997 17:03:15 +0800 (TSD)
Message-Id: <199707250903.RAA16942@www.tomsk.su>
Date: Fri, 25 Jul 1997 17:03:15 +0800 (TSD)
From: "Anatoly A. Orehovsky" <tolik@www.tomsk.su>
Reply-To: tolik@www.tomsk.su, tolik@mpeks.tomsk.su
To: FreeBSD-gnats-submit@freebsd.org
Subject: Problem with http-auth or http-proxy-auth in fetch
X-Send-Pr-Version: 3.2

>Number:         4165
>Category:       bin
>Synopsis:       fetch gone to interminable query cycle after successful http-auth or http-proxy-auth
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 25 02:10:00 PDT 1997
>Closed-Date:    Tue Apr 14 12:17:59 PDT 1998
>Last-Modified:  Tue Apr 14 12:18:13 PDT 1998
>Originator:     Anatoly A. Orehovsky
>Release:        FreeBSD 2.2.2-RELEASE i386
>Organization:
CISA Ltd.
>Environment:

Any http-auth or http-proxy-auth required query to web-server.

>Description:

After successful authentication fetch gone to interminable query cycle,
although web-server sended answer "200 Ok".

Wrong place for "autherror = 0" in fetch/http.c.

>How-To-Repeat:

HTTP_AUTH="basic:realm:user:password" fetch http://http-auth-required-resource

or

HTTP_PROXY_AUTH="basic:realm:user:password" fetch http://http-proxy-auth-required-resource

If realm&user&password is right, fetch go to interminable query cycle
staight.

>Fix:
Patch:
*** http.c.orig	Mon Mar 10 14:12:51 1997
--- http.c	Fri Jul 25 16:43:18 1997
***************
*** 433,439 ****
  	restarting = fs->fs_restart;
  	redirection = 0;
  	retrying = 0;
- 	autherror = 0;
  
  	/*
  	 * Figure out the timeout.  Prefer the -T command-line value,
--- 433,438 ----
***************
*** 657,662 ****
--- 656,662 ----
  	status = http_first_line(line);
  
  	/* In the future, we might handle redirection and other responses. */
+ 	autherror = 0;
  	switch(status) {
  	case 100:		/* Continue */
  		goto got100reply;

--
Anatoly A. Orehovsky. AO9-RIPE. AAO1-RIPN
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: fenner 
State-Changed-When: Sun Aug 10 21:45:33 PDT 1997 
State-Changed-Why:  
This is believed to be fixed in rev 1.8 of http.c . 
Could you try out a new fetch from -current and see 
if the problem is fixed? 

Thanks, 
Bill 
State-Changed-From-To: feedback->closed 
State-Changed-By: phk 
State-Changed-When: Tue Apr 14 12:17:59 PDT 1998 
State-Changed-Why:  
timed out 
>Unformatted:
