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)