Re: HTImProxy configuration variable

> What is the meaning of the HTImProxy configuration variable in HTAccess?

The meaning of this is to be able to distinguish between a client application
and a proxy server. When Ari made the proxy server, the library was in a bad
state and he moved a lot of the functionality to the daemon. However, I am now
implementing a lot of this in the library, so the variable will be less and less
important. 

> Its default value is "NO" and the only comment I can find is "If I'm
> cern_httpd as a proxy".
> 
> This flag's default value causes my MEHOD_HEAD HTLoadPage request to return
> an empty stream.  Further debugging shows that in HTLoadHTTP's state machine
> the state transition:

> case HTTP_SENT_REQUEST:			    /* Put up stream */
>     http->target = HTImProxy ? request->output_stream :
> HTTPStatus_new(request, http);
>     http->state = HTTP_NEED_BODY;
>     break;
> 
> uses HTImProxy to select the HTTPStatus_new stream rather than the desired
> request->output_stream.  The HTTPStatus stream then eats the HTML header
> information (as it should for the GET method, but not the HEAD method).

Unfortunately there is a bug in the code which makes that HEAD doesn't work
(funny, I would swear that it worked 10 minutes ago ;-) ). You can fix it
by applying the patch below.

-- cheers --

Henrik

                         0
                          \ /
-- CLIP -- CLIP -- CLIP -- x -- CLIP -- CLIP -- CLIP -- CLIP -- CLIP -- CLIP --
                          / \
                         0


*** HTTP.c	Tue Mar 21 18:04:54 1995
--- HTTP.c.new	Sat May  6 23:53:48 1995
***************
*** 496,502 ****
  		me->target = HTMIMEConvert(req, NULL, WWW_MIME,
  					   req->output_format,
  					   req->output_stream);
! 	    } else if (me->status==200 && req->method==METHOD_GET) {
  		HTStream *s;
  
  		me->target = HTStreamStack(WWW_MIME,req->output_format,
--- 496,502 ----
  		me->target = HTMIMEConvert(req, NULL, WWW_MIME,
  					   req->output_format,
  					   req->output_stream);
! 	    } else if (me->status==200) {
  		HTStream *s;
  
  		me->target = HTStreamStack(WWW_MIME,req->output_format,
***************
*** 505,511 ****
  		/* Cache HTTP 1.0 responses */
  		/* howcome added test for return value from HTCacheWriter 12/1/95 */
  
! 		if (HTCacheDir && (s = HTCacheWriter(req, NULL, WWW_MIME,
  							req->output_format,
  							req->output_stream)))
  		    {
--- 505,512 ----
  		/* Cache HTTP 1.0 responses */
  		/* howcome added test for return value from HTCacheWriter 12/1/95 */
  
! 		if (req->method==METHOD_GET &&
! 		    HTCacheDir && (s = HTCacheWriter(req, NULL, WWW_MIME,
  							req->output_format,
  							req->output_stream)))
  		    {
 

Received on Saturday, 6 May 1995 23:56:55 UTC