*) Bugfix for URLs containing spaces

See: http://www.yacy-forum.de/viewtopic.php?t=1640

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1422 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 19 years ago
parent 754a35877f
commit 75aad0fe66

@ -501,8 +501,8 @@ public final class httpHeader extends TreeMap implements Map {
}
// store the version propery "HTTP" and cut the query at both ends
int sep = args.indexOf(" ");
if (sep >= 0) {
int sep = args.lastIndexOf(" ");
if ((sep >= 0)&&(args.substring(sep + 1).toLowerCase().startsWith("http/"))) {
// HTTP version is given
prop.setProperty(httpHeader.CONNECTION_PROP_HTTP_VER, args.substring(sep + 1).trim());
args = args.substring(0, sep).trim(); // cut off HTTP version mark
@ -511,6 +511,10 @@ public final class httpHeader extends TreeMap implements Map {
prop.setProperty(httpHeader.CONNECTION_PROP_HTTP_VER, "HTTP/0.9");
}
// replacing spaces in the url string correctly
args = args.replaceAll(" ","%20");
// properties of the query are stored with the prefix "&"
// additionally, the values URL and ARGC are computed

Loading…
Cancel
Save