Background: I have a Java webserver class (NanoHTTPD) which my application extends by adding sessions, page templates, authentication, and dynamic content. I wanted to make the application self contained and not rely on anything but SQLite. It is meant to run with only Java and SQLite installed.
Now for my problem. I am testing a simple index page with only Logout link. If a user goes to the index without logging in, they are HTTP redirected to the Login page. When they POST the credentials and are validated, it returns them to the index page. If you click the Logout link in Firefox, my application only receives a URI to the index('/'). Following the same process in Chrome it logs the user out as expected. I do no modify the GET URL at any point; I only run uri.equals("/logout/"). Is there any reason why Firefox would interpret this link differently?
Login HTML:
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
<html>
<head>
<title>Login</title>
</head>
<body>
<h1>Login</h1>
<div>
<p></p>
<form method="post" action="/login/">
<table>
<tr>
<td>
<label for="username">Username</label>
<input type="text" name="username" id="username" maxlength="100" />
</td>
<td>
<label for="password">Password</label>
<input type="password" name="password" id="password" />
</td>
<td></td>
<td>
<input type="submit" value="Sign In" />
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
Index HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Index</title>
</head>
<body>
<h1>Index</h1>
<a href="/logout/">Logout</a>
</body>
</html>
The code for matching URL's is just .equals() and the only code running before this is NanoHTTPD which is located here: https://github.com/elonen/nanohttpd/blob/master/NanoHTTPD.java
One more thing, I have made a page, "test.html", to which I copied the source from above. Firefox does not handle it correctly either and stays on the page without giving a File Not Found error. Additionally, if I change the page to use "/logout1/", everything works.