6 points · by vineetdhanawat · 14y ago · 3 comments
The server just receives the URL from the client as a string; there's nothing in the protocol that requires a trailing slash to be ignored. Consider:
if (REQUEST_URL == "/something") send_something()
if (REQUEST_URL == "/something/") send_something_else()
Many web servers, such as Apache, helpfully adds a missing slash if it detects that the URL you're trying to access actually maps to a directory in the file system.But then surprisingly Google is returning a 404 error page to its own search result!