- From: Henrik Frystyk Nielsen <frystyk@w3.org>
- Date: Wed, 30 Aug 1995 19:08:51 -0400
- To: mitch@tam.net (Mitch DeShields)
- Cc: www-lib@www10.w3.org, mouye@firstfloor.com
> We are updating our code to use the WWWLib 3.1 from WWWLib 3.0. In 3.0 we > found that to get METHOD_HEAD to work we needed to set the HTImProxy global > variable to YES to keep the MIME parser from eating the header information. > With the WWWLib 3.1 we found that this no longer works, here's why and how > we fixed it. > > Our goal is simple, use the WWWLib to get HTTP headers and pages off the net > and into a local file. We created our own HTStreamClass and provide an > instance of it to request->output_stream. The problem is the following code > in HTTP.c:HTLoadHTTP:case HTTP_NEED_CONNECTION This sould be a simple task. All you have to set in the request structure is the following: request->method = METHOD_HEAD; request->output_format = WWW_MIME; WWW_MIME doesn't really make sense - it's just an internal repressentation meaning that the MIME headers should be kept. You can see an example in Line Mode Browser using: www -head -o <local.file> http://www.w3.org if you want the whole content plus MIME headers then use www -to www/mime -o <local.file> http://www.w3.org (the code can be found in HTBrowse.c in the LineMode/Implementation directory) -- Henrik Frystyk Nielsen, <frystyk@w3.org> World-Wide Web Consortium, MIT/LCS NE43-356 545 Technology Square, Cambridge MA 02139, USA
Received on Wednesday, 30 August 1995 19:13:12 UTC