Title: Message Title
|
|
Updated the description above. I just realized there were other "/static" paths that cause a 500 response to be thrown. However, again, the error is benign. It's just returning an incorrect HTTP response code (500 instead of 404).
|
|
Change By:
|
Tim Donohue
|
Summary:
|
XMLUI returns 500 response for some ALL invalid "/static" URLs
|
|
Initially reported in this thread: http://dspace.2283337.n4.nabble.com/More-enterprise-deployment-questions-td4670528.html
The DSpace XMLUI seems to respond with a 500 response (rather than a proper 404) for some invalid paths which begin with "/static".
It only There seems to occur be two forms of errors..
1) NullPointerException (with 500 response) is thrown for URLs of this format:
[dspace-xmlui-url]/static/*/*.js [dspace-xmlui-url]/static/*/*.css [dspace-xmlui-url]/static/*/*.json
In other words, the XMLUI path must start with "/static/", and it must end with either ".js", ".css" or ".json". So, it Here 's some examples from the demo.dspace.org server: http://demo.dspace.org/xmlui/static/not/ a very specific URL structure that throws this /valid/file.js ( 500 response ) http://demo.dspace.org/xmlui/static/notvalid.css ( all others will return 404 responses 500 response )
2) FileNotFoundException or ResourceNotFound is thrown (with an incorrect 500 response) for URLs that begin with "/static" and have a subpath . Here's Again, some examples from the demo.dspace.org server :
http://demo.dspace.org/xmlui/static/not/a/valid/path/ (500 response) http://demo.dspace.org/xmlui/static/blah/notvalid.html (500 response) http://demo.dspace.org/xmlui/static/notvalid.html (correct 404 response)
The underlying error IS BENIGN. Essentially, what is going on here is that we have some special processing to allow institutions to easily add custom _javascript_ or CSS files to their themes. Those custom files become available on the "/static" path. See this line in the sitemap.xmap: https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/webapp/sitemap.xmap#L645
Currently, if someone attempts to reference a .js/.css/.json file which does NOT exist, DSpace code is unfortunately throwing a Java NullPointerException (as it's failing to check if the requested file actually exists). Here's the line where the NullPointerException is thrown: https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/java/org/dspace/app/xmlui/cocoon/ConcatenationReader.java#L174
While this error is annoying, and the 500 response is incorrect, it is benign. No _javascript_ is being executed by DSpace. It's just an error where the underlying Java code is not checking for a possible "null" result (which only occurs when the requested *.js/*.css/*.json file is not found).
|
|
|
|
|
|
------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable
security intelligence. It gives you real-time visual feedback on key
security issues and trends. Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel