Plus signs in query string is expected to be replaced with spaces. However, it it not the case for path.
Please look at example below.
http://example.com/foo+bar.html should open foo+bar.htmlhttp://example.com/foo%20bar.html should open foo bar.htmlhttp://example.com/foo+bar?key=val+val should open foo+bar with key=val val
NanoHTTPD currently treats http://example.com/foo+bar.html as http://example.com/foo bar.html, which is wrong according to RFC 1738.
Plus signs in query string is expected to be replaced with spaces. However, it it not the case for path. Please look at example below.
http://example.com/foo+bar.html
should openfoo+bar.html
http://example.com/foo%20bar.html
should openfoo bar.html
http://example.com/foo+bar?key=val+val
should openfoo+bar
withkey=val val
NanoHTTPD currently treats
http://example.com/foo+bar.html
ashttp://example.com/foo bar.html
, which is wrong according to RFC 1738.For more information, please look at this SO answer.