Adding an header to the request

Hi,

I'm trying to add a `Accept-Encoding: gzip' header to the HTTP request issued
by my client. When I use HTHeader_addGenerator(); the client hangs. 

Version: libwww 5.1g compiled with gcc 2.8
CPU/OS: SparcStation 5, Solaris 2.5.1
Server: Apache 1.2.0

Here's the call and the callback it registers:

static int
accept_header(HTRequest * request, HTStream * target)
{
    cerr << "Entering accept_header" << endl;
    const char *encoding = "X-Accept-Encoding: r\n";
    PUTBLOCK(encoding, strlen(encoding)+1);
    cerr << "Leaving accept_header" << endl;

    return HT_OK;
}

{
    ...

    if (accept_gzip)
	HTHeader_addGenerator(accept_header);

    ...
}

Here's the tail end of a protocol and stream trace of the client:

    ...
    HTHost 10c468 going to state TCP_NEED_CONNECT.
    HTHost 10c468 going to state TCP_CONNECTED.
    HTHost 10c468 connected.
    HTTP........ Force flush on preemptive load
    Tee......... Created stream 103a30 with resolver a8024
    HTTP........ Dumping request to `w3chttp.out'
    HTTP........ Generating Request Headers
    HTTPGen..... Extra global
    Entering accept_header
    Leaving accept_header
    HTTP........ Generating General Headers
    Buffer...... Flushing 10cd78

    <hangs here>

Thanks in advance,
James

-- 
__________________________________________________________________________

James Gallagher		         The Distributed Oceanographic Data System
jgallagher@gso.uri.edu                            http://dods.gso.uri.edu/

Received on Friday, 6 February 1998 22:44:02 UTC