I have found the bug in URL.cc file.

Method: URL::URL(const String &url, const URL &parent)
if parent ULR is like: "http://telur.ru/catalog.php?cat_id=2204";
and url like: "?cat_id=2204&page=4" then
IE and Firefox resolve URL to: "
http://telur.ru/catalog.php?cat_id=2204&page=4";, but htdig resolves it to: "
http://telur.ru/?cat_id=2204&page=4";

It is fixed very simple:
instead of:

...
if (_path.last() == '/')
{
       //
       // Parent was a directory.  Easy enough: just append
       // the current ref to it
       //
       _path << ref;
}
...

should be:

...
if (_path.last() == '/' || *rel=='?')
{
       //
       // Parent was a directory.  Easy enough: just append
       // the current ref to it
       //
       _path << ref;
}
...

Hope it helps. I've tested this version. All works fine for me.
Please, let me know if I'm wrong.

Best regards,
Denis Sidorenko,
Russia(Moscow)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
ht://Dig Developer mailing list:
htdig-dev@lists.sourceforge.net
List information (subscribe/unsubscribe, etc.)
https://lists.sourceforge.net/lists/listinfo/htdig-dev

Reply via email to