Closed GoogleCodeExporter closed 9 years ago
Similary, Location: redirects don't work correctly either.
http://doodle77.dyndns.org/dstestcase/testcase2.php should redirect you to
http://doodle77.dyndns.org/dstestcase/testcase2.php?a
Original comment by Doodle...@gmail.com
on 20 Sep 2009 at 1:22
Patch should be this:
$ diff URI.cpp URI_patch.cpp
281a282,294
> else if (newFile[0] == '?')
> {
> // internal link, add newFile to the existing address
> size_t lastQuestionMark(tmp.m_address.rfind("?"));
> if (lastQuestionMark == string::npos)
> {
> newURI = tmp.m_address + newFile;
> }
> else
> {
> newURI += tmp.m_address.substr(0,lastQuestionMark) + newFile;
> }
> }
Original comment by Doodle...@gmail.com
on 20 Sep 2009 at 3:59
actually patch should be this, so that it doesn't mess up linking from a.php#b
to a.php?c
$ diff URI.cpp URI_patch.cpp
281a282,294
> else if (newFile[0] == '?')
> {
> // internal link, add newFile to the existing address
> size_t lastQuestionMark(tmp.m_address.rfind("?"));
> if (lastQuestionMark == string::npos)
> {
> newURI = tmp.m_address.substr(0,tmp.m_address.rfind("#")) + newFile;
> }
> else
> {
> newURI += tmp.m_address.substr(0,lastQuestionMark) + newFile;
> }
> }
Original comment by Doodle...@gmail.com
on 20 Sep 2009 at 2:40
Thanks for the patch! Applied in r6838620cc1
Original comment by richard.quirk
on 17 Oct 2009 at 5:43
Original issue reported on code.google.com by
Doodle...@gmail.com
on 20 Sep 2009 at 1:16