W3C home > Mailing lists > Public > www-lib@w3.org > October to December 2000

Re: Obtaining status response from libwww

From: <Timo.Ross@ic3s.de>
Date: Tue, 28 Nov 2000 09:24:34 +0100
To: mjw@host.igs.net
Cc: www-lib@w3.org, www-lib-request@w3.org
Message-ID: <OF9BC355A8.522E358A-ONC12569A5.002D8792@ic3s.de>

Good morning, Mark!

The only way I know, to get the HTTP status of a request, is to add your
own "after-filter". Something like this:

     // your after filter
     int terminator(HTRequest * req, HTResponse * resp, void * param, int
     { ... }

     // in your main program ...
     HTNet_addAfter(terminator, NULL, NULL, HT_ALL, HT_FILTER_LAST);

In "status" you will get the HTTP-status of the request "req"!
Hope this will help you ...

Ciao D.

Hi people!

Reading without headers, but need a bit of header info...

I'm largely following the example in chunkbody.c, I'm doing a:
           HTAnchor * anchor = HTAnchor_findAddress(absolute_url);
           chunk = HTLoadAnchorToChunk(anchor, request);
..but then followed by
           parent = HTAnchor_parent(anchor);
           format = HTAnchor_format(parent);

so I can obtain the "Content-type:".  Fine. That works fine...
..but just how on earth do I get the status response in the
"HTTP/1.x" line? It sure ain't by "HTAnchor_version" because
that's returning a null, and it's sure ain't by any "HTAnchor_header"
because that returns nulls too.

I'm a teensie bit baffled right now.......Anyone have any ideas? Pretty

Received on Tuesday, 28 November 2000 03:25:16 UTC

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