[
https://jira.jboss.org/jira/browse/RF-8277?page=com.atlassian.jira.plugin...
]
Alexander Smirnov resolved RF-8277.
-----------------------------------
Resolution: Done
Wrapper for HttpServletResponse records response status and does not send response content
if status code was set to 204 ( No Content ) or 304 ( Not Modified ).
According to HTTP 1.1 RFC
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html these are
the only codes that do not allow any message body.
ajax4jsf Filter should ignore HTTP 304 and other responses <200 or
>299
-----------------------------------------------------------------------
Key: RF-8277
URL:
https://jira.jboss.org/jira/browse/RF-8277
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-a4j-core
Affects Versions: 3.3.3.BETA1
Reporter: Mark Struberg
Assignee: Alexander Smirnov
Fix For: 3.3.3.CR1
It seems the Filter currently tries to reformat the response in any case. But if you e.g.
get a HTTP 304 response, this doesn't even have a content body (onyl headers) and
wrinting to the response causes an Exception:
{noformat}
java.lang.IllegalStateException: NO CONTENT
at org.mortbay.jetty.HttpGenerator.addContent(HttpGenerator.java:106)
at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:644)
at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:579)
at java.io.ByteArrayOutputStream.writeTo(ByteArrayOutputStream.java:109)
at org.mortbay.jetty.AbstractGenerator$OutputWriter.write(AbstractGenerator.java:901)
at org.mortbay.jetty.AbstractGenerator$OutputWriter.write(AbstractGenerator.java:752)
at java.io.PrintWriter.write(PrintWriter.java:412)
at java.io.PrintWriter.write(PrintWriter.java:429)
at org.ajax4jsf.io.parser.ParsingContext.sendBuffer(ParsingContext.java:118)
at org.ajax4jsf.io.parser.ParsingContext.send(ParsingContext.java:131)
at org.ajax4jsf.io.parser.FastHtmlParser.parse(FastHtmlParser.java:162)
at org.ajax4jsf.io.parser.FastHtmlParser.parseHtml(FastHtmlParser.java:230)
at
org.ajax4jsf.webapp.FilterServletResponseWrapper.parseContent(FilterServletResponseWrapper.java:594)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:367)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
{noformat}
--
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