Create an Account
username: password:
 
  MemeStreams Logo

MemeStreams Discussion

search


This page contains all of the posts and discussion on MemeStreams referencing the following web page: Space, +, and %20. You can find discussions on MemeStreams as you surf the web, even if you aren't a MemeStreams member, using the Threads Bookmarklet.

Space, +, and %20
by Acidus at 12:54 pm EDT, Sep 17, 2009

I spend a large amount of time looking at URLs. Most of that time is spent looking at the query string. Which caused me to completely miss a problem in WebInspect's URL normalization logic.

Quick, spaces can be URL encoded as either + or %20 right?

True, but only in the query string. So:

http://site.com/foo.php?msg=billy+hoffman
http://site.com/foo.php?msg=billy%20hoffman

both normalize to the same things.

When in the path or filename %20 is a space and + is a literal + character in the filename.

So the urls:

http://site.com/filename+with+spaces.html
http://site.com/filename%20with%20spaces.html

point to two different files on the webserver named "file+with+spaces.txt" and "filename with spaces.txt" respectively.

If you are someone who has to handle URLs, remember that you cannot do a blanket "url = url.Replace("+", "%20") as part of your normalization logic.


 
 
Powered By Industrial Memetics