Re: [htdig] htdig keeling over...

Gilles Detillieux (
Wed, 3 Feb 1999 13:31:31 -0600 (CST)

According to (Avi):
> At 9:13 PM -0400 2/2/99, Geoff Hutchison wrote:
> > So you say "I don't care if it's invalid, ht://Dig should be able to keep
> > going." Fair enough. But I'm beginning to worry about the complexity of that
> > section of code if people keep finding non-compliant servers. There's a
> > reason for RFCs...
> It would be nice to have some exception-handling so that errors like
> this are caught, logged, and skipped, rather than causing the whole
> system to stop. Perhaps you could do some kind of reality check
> first on important data. Even if the servers are non-standard, the
> app should be robust enough to work around that.

Well, my patch doesn't log the error, but it does try to deal with it
in a better way. Now getdate() doesn't care if the weekday is long,
short, bad, or even missing. It just ignores it. It also allows one
of two different styles of date format, regardless of the style of
weekday used, and it checks to see if mystrptime() fails. If both
attempts fail, it falls back on the current time.

I don't know why some implementations of strftime() would fail when
given bad input from (my)strptime(), but with the error checking in
place now, strftime() shouldn't be getting bad data anymore, so I
hope the segmentation faults in this piece of code are a thing of the

I agree that errors like this shouldn't cause the dig to stop, much less
dump core, but this is one of several bugs that's been tricky to stomp
out, given the system-dependent nature of the problem. On most systems,
this behaviour was not happening. That's why we're counting on lots of
testers of the beta and pre-release code! :)

Gilles R. Detillieux              E-mail: <>
Spinal Cord Research Centre       WWW:
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930
To unsubscribe from the htdig mailing list, send a message to containing the single word "unsubscribe" in
the SUBJECT of the message.

This archive was generated by hypermail 2.0b3 on Wed Feb 10 1999 - 17:09:05 PST