[
https://jira.jboss.org/jira/browse/JBSEAM-2820?page=com.atlassian.jira.pl...
]
Ashish Tonse commented on JBSEAM-2820:
--------------------------------------
This is really close to a patch I've already submitted to the caching issue
(JBSEAM-4186). I can code up a patch for this too.
I recommend that it should send 404 for invalid component names (assuming the request is
well-formed).
And it would send a 400 BAD REQUEST if the number of arguments are invalid:
example using the new path based interface.js scheme:
/name1;name2;name3/random/paths/added/interface.js should return 400
Remoting should not throw exception but 400/404 on invalid request
------------------------------------------------------------------
Key: JBSEAM-2820
URL:
https://jira.jboss.org/jira/browse/JBSEAM-2820
Project: Seam
Issue Type: Bug
Components: Remoting
Reporter: Christian Bauer
Assignee: Shane Bryzak
Some crazy Java program is making HTTP requests on our live site:
85.82.169.224 - - [04/Apr/2008:15:38:48 +0100] "GET
/seam/resource/remoting/interface.js HTTP/1.1" 200 - "null"
"Java/1.5.0_13"
I'm guessing this is a home-written HTML parser or something from a Danish ;) guy or
a website "downloader" or something. In any case, it cuts off the request
parameters and we throw an exception:
15:38:48,818 ERROR [Remoting] Error
javax.servlet.ServletException: Invalid request - no component specified
at
org.jboss.seam.remoting.InterfaceGenerator$1.process(InterfaceGenerator.java:73)
at
org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)
at org.jboss.seam.remoting.InterfaceGenerator.handle(InterfaceGenerator.java:64)
at org.jboss.seam.remoting.Remoting.getResource(Remoting.java:111)
at org.jboss.seam.servlet.SeamResourceServlet.doGet(SeamResourceServlet.java:75)
Do not throw an exception but either return 400 INVALID REQUEST or 404 NOT FOUND.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira