|
From: Lachlan A. <lh...@ee...> - 2002-09-09 01:50:06
|
Greetings,
I've been trying to use htDig://'s ExternalTransport to
index KDE's "kurl"s, such as help:/ man:/ info:/ etc.
As the code stands (or stood, circa June) it seg faults
when it dereferences _access_time immediately after
deleting it in Reset(). This can be fixed by the trivial
patch below, but I'm surprised it hasn't caused havoc
earlier. Has anyone else used (tested?) ExternalTransport?
(I haven't yet checkied if this patch introduces a
memory leak.)
The other problem is the format of "kurl"s, which use a
single '/' after the ':'. This complies with RFC 1738,
since they don't "involve the direct use of an IP-based
protocol to a specified host on the Internet". However
htDig:// parses the url and returns "host not known" before
calling ExternalTransport. Moreover, it automatically
translates the help:/ into help:// . Technically, the
simplest hack is to make KDE accept arbitrarily many '/'s
(but getting the KDE team to accept them may be harder :)
but it may be more elegant to fix htDig://. Comments or
pointers would be welcome.
Cheers,
Lachlan
*** ExternalTransport.cc Fri Sep 6 22:44:49 2002
--- ExternalTransport.cc.lha Fri Sep 6 22:44:53 2002
***************
*** 188,193 ****
--- 188,194 ----
// Set up a response for this request
_Response->Reset();
// We just accessed the document
+ _Response->_access_time = new HtDateTime;
_Response->_access_time->SettoNow();
--
Lachlan Andrew Phone: +613 8344-3816 Fax: +613 8344-6678
Dept. Electrical and Electronic Eng. CRICOS Provider Code
University of Melbourne, Victoria, 3010 AUSTRALIA 00116K
|