- Throw 403 instead of 404 from flags.jsp and viewstat.jsp
so we don't render error.jsp
This commit is contained in:
@ -25,6 +25,12 @@ if (c != null && c.length() > 0) {
|
|||||||
if (rendered)
|
if (rendered)
|
||||||
cout.close();
|
cout.close();
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* Send a 403 instead of a 404, because the server sends error.jsp
|
||||||
|
* for 404 errors, complete with the summary bar, which would be
|
||||||
|
* a huge load for a page full of flags if the user didn't have the
|
||||||
|
* flags directory for some reason.
|
||||||
|
*/
|
||||||
if (!rendered)
|
if (!rendered)
|
||||||
response.sendError(404, "Not found");
|
response.sendError(403, "Flag not found");
|
||||||
%>
|
%>
|
@ -63,7 +63,12 @@ if ( !rendered && ((rs != null) || fakeBw) ) {
|
|||||||
}
|
}
|
||||||
} catch (NumberFormatException nfe) {}
|
} catch (NumberFormatException nfe) {}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* Send a 403 instead of a 404, because the server sends error.jsp
|
||||||
|
* for 404 errors, complete with the summary bar, which would be
|
||||||
|
* a huge load for a page full of graphs if there's a problem
|
||||||
|
*/
|
||||||
if (!rendered) {
|
if (!rendered) {
|
||||||
response.sendError(404, "That stat is not available");
|
response.sendError(403, "That stat is not available");
|
||||||
}
|
}
|
||||||
%>
|
%>
|
Reference in New Issue
Block a user