The bug in URL.cc (htcommon folder)
"Denis Sidorenko" <[email protected]> Tue, 20 Feb 2007 21:49:46 +0300
| Newsgroups | gmane.comp.web.htdig.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============1831525261==
Content-Type: multipart/alternative;
boundary="----=_Part_52880_16503966.1171997386032"
------=_Part_52880_16503966.1171997386032
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
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)
------=_Part_52880_16503966.1171997386032
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
I have found the bug in URL.cc file.<br><br>Method: URL::URL(const String &url, const URL &parent) <br>if parent ULR is like: "<a href="http://telur.ru/catalog.php?cat_id=2204">http://telur.ru/catalog.php?cat_id=2204
</a>"<br>and url like: "?cat_id=2204&page=4" then <br>IE and Firefox resolve URL to: "<a href="http://telur.ru/catalog.php?cat_id=2204&page=4">http://telur.ru/catalog.php?cat_id=2204&page=4
</a>", but htdig resolves it to: "<a href="http://telur.ru/?cat_id=2204&page=4">http://telur.ru/?cat_id=2204&page=4</a>"<br><br>It is fixed very simple:<br>instead of:<br><br>...<br>if (_path.last() == '/')
<br>{<br> //<br> // Parent was a directory. Easy enough: just append<br> // the current ref to it<br> //<br> _path << ref;<br>} <br>...<br><br>should be:<br><br>...<br>
if (_path.last() == '/' || *rel=='?')<br>
{<br>
//<br>
// Parent was a directory. Easy enough: just append<br>
// the current ref to it<br>
//<br>
_path << ref;<br>
} <br>
...<br><br>Hope it helps. I've tested this version. All works fine for me.<br>Please, let me know if I'm wrong.<br><br>Best regards,<br>Denis Sidorenko,<br>Russia(Moscow)<br><br>
------=_Part_52880_16503966.1171997386032--
--===============1831525261==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
-------------------------------------------------------------------------
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
--===============1831525261==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ht://Dig Developer mailing list:
[email protected]
List information (subscribe/unsubscribe, etc.)
https://lists.sourceforge.net/lists/listinfo/htdig-dev
--===============1831525261==--