libwww core-dump on server-redirect

Is the libwww supposed to be able to handle a server redirect? My
mini http retrieving application is now crashing when the server redirects
it. I.e. if I point it at http://www.washington.edu, which will get
redirected to a specific port (depending on the client's IP address), I
get a core-dump. I have not tried any other redirecting servers yet.

Here is the echo...
Composing Authorization for www.washington.edu:80//
HTAASetup_lookup: No template matched `/' (so probably not protected)
HTMIME: MIME content type is text/html, converting to */*
StreamStack. Constructing stream stack for text/html to */*
<HEAD><TITLE>Document's real location</TITLE></HEAD>
<BODY>
<H1>Document not really at this site</H1>
Document is really
<A HREF="http://www.washington.edu:1184/">
here</A>.<P>
</BODY>
Composing Authorization for www.washington.edu:1184/
HTAASetup_lookup: No template matched `' (so probably not protected)
HTMIME: Bad character `a' found where `ocation:' expected
HTMIME: Bad character `l' found where `t' expected
HTMIME: MIME content type is text/html, converting to */*
StreamStack. Constructing stream stack for text/html to */*
Segmentation fault (core dumped)

The dbx stack trace is:
(dbx) where
>  0 HTMIME_write(me = 0x10016200, b = 0x1001c0ba = "<HTML>\n<HEAD>\n<!--DO NOT
EDIT.  THIS FILE WAS CREATED AUTOMATICALLY.  DO NOT EDIT-->\n<!--BASE
HREF="http://www.cac.washington.edu/in\...", l = 326)
["../../Library/Implementation/HTMIME.c":336, 0x432bb8]
   1 HTTPStatus_put_block(me = 0x10016100, b = 0x1001c010 = "Date:
Wednesday, 07-Jun-95 21:11:28 GMT\nServer: NCSA/1.3\nMIME-version: 1.0\nContent-type:
text/html\nLast-modified: Wednesday, 07-Jun-\...", l = 496)
["../../Library/Implementation/HTTP.c":571, 0x41bfac]
   2 .block72 ["../../Library/Implementation/HTFormat.c":1189, 0x40c6ec]
   3 HTInputSocket_read(isoc = 0x1001c000, target = 0x10016100)
["../../Library/Implementation/HTFormat.c":1189, 0x40c6ec]
   4 HTLoadHTTP(request = 0x10016000)
["../../Library/Implementation/HTTP.c":723, 0x41c614]
   5 .block17 ["../../Library/Implementation/HTAccess.c":697, 0x402cf0]
   6 HTLoad(request = 0x10016000, keep_error_stack = '^A')
["../../Library/Implementation/HTAccess.c":697, 0x402cf0]
   7 .block21 ["../../Library/Implementation/HTAccess.c":858, 0x4033ac]
   8 .block20 ["../../Library/Implementation/HTAccess.c":858, 0x4033ac]
   9 .block19 ["../../Library/Implementation/HTAccess.c":858, 0x4033ac]
  10 HTLoadDocument(request = 0x10016000, keep_error_stack = '^A')
["../../Library/Implementation/HTAccess.c":858, 0x4033ac]
  11 HTLoadAnchorRecursive(anchor = 0x1001b080, request = 0x10016000)
["../../Library/Implementation/HTAccess.c":1008, 0x403748]
  12 .block181 ["../../Library/Implementation/HTTP.c":754, 0x41c854]
  13 HTLoadHTTP(request = 0x10016000)
["../../Library/Implementation/HTTP.c":754, 0x41c854]
  14 .block17 ["../../Library/Implementation/HTAccess.c":697, 0x402cf0]
  15 HTLoad(request = 0x10016000, keep_error_stack = '\000')
["../../Library/Implementation/HTAccess.c":697, 0x402cf0]
  16 .block21 ["../../Library/Implementation/HTAccess.c":858, 0x4033ac]
  17 .block20 ["../../Library/Implementation/HTAccess.c":858, 0x4033ac]
  18 .block19 ["../../Library/Implementation/HTAccess.c":858, 0x4033ac]
  19 HTLoadDocument(request = 0x10016000, keep_error_stack = '\000')
["../../Library/Implementation/HTAccess.c":858, 0x4033ac]
  20 HTLoadAbsolute(addr = 0x7fffbac1 = "http://www.washington.edu",
request = 0x10016000) ["../../Library/Implementation/HTAccess.c":885, 0x40347c]
  21 main(argc = 2, argv = 0x7fffba34) ["get_http.c":68, 0x40045c]

And the text of my program is as follows (I have taken out the loop, now
it is even simpler)...

main(int argc, char *argv[])
{
  char      *url;
  HTRequest *request;

  /* Initialize the library */
  HTLibInit();
  WWW_TraceFlag = TRUE;

  if (!(url = argv[1]))
    exit(1);

  /* Set up the request structure */
  request = HTRequest_new();
  request->output_format = WWW_SOURCE;
  request->output_stream = HTFWriter_new(stdout, TRUE);

  HTLoadAbsolute(url, request);
  HTLibTerminate();
}

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
= Matthew M. Freedman                                                 =
= U. of Washington Information Systems       mattf@cac.washington.edu =
= 4545 15th Ave. NE; 3rd Floor               (206) 543-5593           =
= Seattle, WA  98105                                                  =
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Received on Wednesday, 7 June 1995 17:15:46 UTC