|
List Info
Thread: Created: (HTTPCLIENT-588) relative URIs with internal double-slashes ('//') misparsed
|
|
| Created: (HTTPCLIENT-588) relative URIs
with internal double-slashes ('//')
misparsed |

|
2006-06-16 01:58:29 |
relative URIs with internal double-slashes ('//')
misparsed
-----------------------------------------------------------
Key: HTTPCLIENT-588
URL: h
ttp://issues.apache.org/jira/browse/HTTPCLIENT-588
Project: Jakarta HttpClient
Type: Bug
Components: HttpClient
Versions: 3.0.1
Reporter: Gordon Mohr
URI.parseUriReference()'s heuristic for interpreting URI
parts is thrown off by relative URIs which include an
internal '//'. As a result, portions of the supplied
relative URI (path) can be lost.
For example:
URI rel = new URI("foo//bar//baz");
rel.toString();
(java.lang.String) //bar//baz
The culprit seems to be line 1961 of URI improperly
concluding that two slashes later than the beginning of
'tmp' are still indicative the URI is a 'net_path'.
A possible quick fix might be to add a '!isStartedFromPath
&&' to the beginning of the line 1961 test, making
the line:
if (!isStartedFromPath && at + 2 <
length && tmp.charAt(at + 1) == '/') {
... and thus preventing the misguided authority-parsing from
happening when earlier analysis already identified the
current string as a strictly path-oriented URI.
(It also appears the setting of the is_net_path boolean at
the end of this if's block may be wrong; this code is run
for hier_path URIs that are not net_paths in the 2396
syntax. For example:
URI uri = new URI("http://www.example.c
om/some/page");
uri.isNetPath();
(boolean) true
)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atl
assian.com/software/jira
------------------------------------------------------------
---------
To unsubscribe, e-mail: httpclient-dev-unsubscribe jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help jakarta.apache.org
|
|
| Commented: (HTTPCLIENT-588) relative
URIs with internal double-slashes ('//')
misparsed |

|
2006-06-16 14:32:31 |
[ http://issues.apache.org/jira/b
rowse/HTTPCLIENT-588?page=comments#action_12416525 ]
Oleg Kalnichevski commented on HTTPCLIENT-588:
----------------------------------------------
We will happily accept a patch
Oleg
> relative URIs with internal double-slashes ('//')
misparsed
>
-----------------------------------------------------------
>
> Key: HTTPCLIENT-588
> URL: h
ttp://issues.apache.org/jira/browse/HTTPCLIENT-588
> Project: Jakarta HttpClient
> Type: Bug
> Components: HttpClient
> Versions: 3.0.1
> Reporter: Gordon Mohr
>
> URI.parseUriReference()'s heuristic for interpreting
URI parts is thrown off by relative URIs which include an
internal '//'. As a result, portions of the supplied
relative URI (path) can be lost.
> For example:
> URI rel = new URI("foo//bar//baz");
> rel.toString();
> (java.lang.String) //bar//baz
> The culprit seems to be line 1961 of URI improperly
concluding that two slashes later than the beginning of
'tmp' are still indicative the URI is a 'net_path'.
> A possible quick fix might be to add a
'!isStartedFromPath &&' to the beginning of the
line 1961 test, making the line:
> if (!isStartedFromPath && at + 2
< length && tmp.charAt(at + 1) == '/') {
> ... and thus preventing the misguided authority-parsing
from happening when earlier analysis already identified the
current string as a strictly path-oriented URI.
> (It also appears the setting of the is_net_path boolean
at the end of this if's block may be wrong; this code is
run for hier_path URIs that are not net_paths in the 2396
syntax. For example:
> URI uri = new URI("http://www.example.c
om/some/page");
> uri.isNetPath();
> (boolean) true
> )
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atl
assian.com/software/jira
------------------------------------------------------------
---------
To unsubscribe, e-mail: httpclient-dev-unsubscribe jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help jakarta.apache.org
|
|
| Updated: (HTTPCLIENT-588) relative URIs
with internal double-slashes ('//')
misparsed |

|
2006-06-17 00:17:30 |
[ http://issues.apache.org/jira/browse/HTTPCLIENT-588?
page=all ]
Gordon Mohr updated HTTPCLIENT-588:
-----------------------------------
Attachment: httpclient-588.patch
Attached patch avoids double-slash-triggered parsing of
authority when it would be inappropriate: when URI is a
simple authority-less path. Test for setting
'isStartedWithPath' improved to not indicate 'true' for
URIs that begin '//'; 'isStartedWithPath' reused in
later check to suppress inappropriate authority-parsing.
Unit test verifies problem in current code and corrected
behavior for test case after fix.
> relative URIs with internal double-slashes ('//')
misparsed
>
-----------------------------------------------------------
>
> Key: HTTPCLIENT-588
> URL: h
ttp://issues.apache.org/jira/browse/HTTPCLIENT-588
> Project: Jakarta HttpClient
> Type: Bug
> Components: HttpClient
> Versions: 3.0.1
> Reporter: Gordon Mohr
> Attachments: httpclient-588.patch
>
> URI.parseUriReference()'s heuristic for interpreting
URI parts is thrown off by relative URIs which include an
internal '//'. As a result, portions of the supplied
relative URI (path) can be lost.
> For example:
> URI rel = new URI("foo//bar//baz");
> rel.toString();
> (java.lang.String) //bar//baz
> The culprit seems to be line 1961 of URI improperly
concluding that two slashes later than the beginning of
'tmp' are still indicative the URI is a 'net_path'.
> A possible quick fix might be to add a
'!isStartedFromPath &&' to the beginning of the
line 1961 test, making the line:
> if (!isStartedFromPath && at + 2
< length && tmp.charAt(at + 1) == '/') {
> ... and thus preventing the misguided authority-parsing
from happening when earlier analysis already identified the
current string as a strictly path-oriented URI.
> (It also appears the setting of the is_net_path boolean
at the end of this if's block may be wrong; this code is
run for hier_path URIs that are not net_paths in the 2396
syntax. For example:
> URI uri = new URI("http://www.example.c
om/some/page");
> uri.isNetPath();
> (boolean) true
> )
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atl
assian.com/software/jira
------------------------------------------------------------
---------
To unsubscribe, e-mail: httpclient-dev-unsubscribe jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help jakarta.apache.org
|
|
| Updated: (HTTPCLIENT-588) relative URIs
with internal double-slashes ('//')
misparsed |

|
2006-06-17 15:48:30 |
[ http://issues.apache.org/jira/browse/HTTPCLIENT-588?
page=all ]
Oleg Kalnichevski updated HTTPCLIENT-588:
-----------------------------------------
Fix Version: 3.1 Alpha 1
Seems all right. I'll check the patch in in a few days if
nobody complains
Oleg
> relative URIs with internal double-slashes ('//')
misparsed
>
-----------------------------------------------------------
>
> Key: HTTPCLIENT-588
> URL: h
ttp://issues.apache.org/jira/browse/HTTPCLIENT-588
> Project: Jakarta HttpClient
> Type: Bug
> Components: HttpClient
> Versions: 3.0.1
> Reporter: Gordon Mohr
> Fix For: 3.1 Alpha 1
> Attachments: httpclient-588.patch
>
> URI.parseUriReference()'s heuristic for interpreting
URI parts is thrown off by relative URIs which include an
internal '//'. As a result, portions of the supplied
relative URI (path) can be lost.
> For example:
> URI rel = new URI("foo//bar//baz");
> rel.toString();
> (java.lang.String) //bar//baz
> The culprit seems to be line 1961 of URI improperly
concluding that two slashes later than the beginning of
'tmp' are still indicative the URI is a 'net_path'.
> A possible quick fix might be to add a
'!isStartedFromPath &&' to the beginning of the
line 1961 test, making the line:
> if (!isStartedFromPath && at + 2
< length && tmp.charAt(at + 1) == '/') {
> ... and thus preventing the misguided authority-parsing
from happening when earlier analysis already identified the
current string as a strictly path-oriented URI.
> (It also appears the setting of the is_net_path boolean
at the end of this if's block may be wrong; this code is
run for hier_path URIs that are not net_paths in the 2396
syntax. For example:
> URI uri = new URI("http://www.example.c
om/some/page");
> uri.isNetPath();
> (boolean) true
> )
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atl
assian.com/software/jira
------------------------------------------------------------
---------
To unsubscribe, e-mail: httpclient-dev-unsubscribe jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help jakarta.apache.org
|
|
| Commented: (HTTPCLIENT-588) relative
URIs with internal double-slashes ('//')
misparsed |

|
2006-06-20 19:59:32 |
[ http://issues.apache.org/jira/b
rowse/HTTPCLIENT-588?page=comments#action_12416974 ]
Roland Weber commented on HTTPCLIENT-588:
-----------------------------------------
looks good
cheers,
Roland
> relative URIs with internal double-slashes ('//')
misparsed
>
-----------------------------------------------------------
>
> Key: HTTPCLIENT-588
> URL: h
ttp://issues.apache.org/jira/browse/HTTPCLIENT-588
> Project: Jakarta HttpClient
> Type: Bug
> Components: HttpClient
> Versions: 3.0.1
> Reporter: Gordon Mohr
> Fix For: 3.1 Alpha 1
> Attachments: httpclient-588.patch
>
> URI.parseUriReference()'s heuristic for interpreting
URI parts is thrown off by relative URIs which include an
internal '//'. As a result, portions of the supplied
relative URI (path) can be lost.
> For example:
> URI rel = new URI("foo//bar//baz");
> rel.toString();
> (java.lang.String) //bar//baz
> The culprit seems to be line 1961 of URI improperly
concluding that two slashes later than the beginning of
'tmp' are still indicative the URI is a 'net_path'.
> A possible quick fix might be to add a
'!isStartedFromPath &&' to the beginning of the
line 1961 test, making the line:
> if (!isStartedFromPath && at + 2
< length && tmp.charAt(at + 1) == '/') {
> ... and thus preventing the misguided authority-parsing
from happening when earlier analysis already identified the
current string as a strictly path-oriented URI.
> (It also appears the setting of the is_net_path boolean
at the end of this if's block may be wrong; this code is
run for hier_path URIs that are not net_paths in the 2396
syntax. For example:
> URI uri = new URI("http://www.example.c
om/some/page");
> uri.isNetPath();
> (boolean) true
> )
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atl
assian.com/software/jira
------------------------------------------------------------
---------
To unsubscribe, e-mail: httpclient-dev-unsubscribe jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help jakarta.apache.org
|
|
| Resolved: (HTTPCLIENT-588) relative URIs
with internal double-slashes ('//')
misparsed |

|
2006-06-21 11:10:30 |
[ http://issues.apache.org/jira/browse/HTTPCLIENT-588?
page=all ]
Oleg Kalnichevski resolved HTTPCLIENT-588:
------------------------------------------
Resolution: Fixed
Patch checked in. Many thanks, Gordon
Oleg
> relative URIs with internal double-slashes ('//')
misparsed
>
-----------------------------------------------------------
>
> Key: HTTPCLIENT-588
> URL: h
ttp://issues.apache.org/jira/browse/HTTPCLIENT-588
> Project: Jakarta HttpClient
> Type: Bug
> Components: HttpClient
> Versions: 3.0.1
> Reporter: Gordon Mohr
> Fix For: 3.1 Alpha 1
> Attachments: httpclient-588.patch
>
> URI.parseUriReference()'s heuristic for interpreting
URI parts is thrown off by relative URIs which include an
internal '//'. As a result, portions of the supplied
relative URI (path) can be lost.
> For example:
> URI rel = new URI("foo//bar//baz");
> rel.toString();
> (java.lang.String) //bar//baz
> The culprit seems to be line 1961 of URI improperly
concluding that two slashes later than the beginning of
'tmp' are still indicative the URI is a 'net_path'.
> A possible quick fix might be to add a
'!isStartedFromPath &&' to the beginning of the
line 1961 test, making the line:
> if (!isStartedFromPath && at + 2
< length && tmp.charAt(at + 1) == '/') {
> ... and thus preventing the misguided authority-parsing
from happening when earlier analysis already identified the
current string as a strictly path-oriented URI.
> (It also appears the setting of the is_net_path boolean
at the end of this if's block may be wrong; this code is
run for hier_path URIs that are not net_paths in the 2396
syntax. For example:
> URI uri = new URI("http://www.example.c
om/some/page");
> uri.isNetPath();
> (boolean) true
> )
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the
administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atl
assian.com/software/jira
------------------------------------------------------------
---------
To unsubscribe, e-mail: httpclient-dev-unsubscribe jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help jakarta.apache.org
|
|
[1-6]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|