W3C home > Mailing lists > Public > www-lib@w3.org > January to March 1998

Adding an header to the request

From: James Gallagher <jimg@dcz.cvo.oneworld.com>
Date: Fri, 6 Feb 1998 20:36:49 -0500 (EST)
Message-Id: <199802070130.RAA28786@dcz.cvo.oneworld.com>
To: www-lib@w3.org

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)


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 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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:47 UTC