You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Peter Mahoney (JIRA)" <de...@myfaces.apache.org> on 2006/02/13 17:34:50 UTC

[jira] Created: (MYFACES-1114) ExtensionsFilter calls addResource.parseResponse() on non-HTML responses

ExtensionsFilter calls addResource.parseResponse() on non-HTML responses
------------------------------------------------------------------------

         Key: MYFACES-1114
         URL: http://issues.apache.org/jira/browse/MYFACES-1114
     Project: MyFaces
        Type: Bug
  Components: Tomahawk  
    Versions: Nightly    
    Reporter: Peter Mahoney


ExtensionsFilter does not check the content type of the response before calling methods on AddResource to parse and add to the output. This causes the HTML parser to fall over when the response is non-HTML.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (MYFACES-1114) ExtensionsFilter calls addResource.parseResponse() on non-HTML responses

Posted by "Peter Mahoney (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1114?page=all ]

Peter Mahoney updated MYFACES-1114:
-----------------------------------

    Attachment: extensions.patch

The attached patch adds a content type check into ExtensionsFilter. A getContentType() method has been added to ExtensionsResponseWrapper to maintain servlet spec 2.3 compatibility.

> ExtensionsFilter calls addResource.parseResponse() on non-HTML responses
> ------------------------------------------------------------------------
>
>          Key: MYFACES-1114
>          URL: http://issues.apache.org/jira/browse/MYFACES-1114
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: Nightly
>     Reporter: Peter Mahoney
>  Attachments: extensions.patch
>
> ExtensionsFilter does not check the content type of the response before calling methods on AddResource to parse and add to the output. This causes the HTML parser to fall over when the response is non-HTML.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-1114) ExtensionsFilter calls addResource.parseResponse() on non-HTML responses

Posted by "Grigoras Cristinel (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1114?page=comments#action_12366256 ] 

Grigoras Cristinel commented on MYFACES-1114:
---------------------------------------------

Hi, 

I have another problem with extension filter. Plese try to use JAAS authentification.
After submit login form i get this error.  

00:46:33,577 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/agentie].[FacesServlet]] Servlet.service() for servlet FacesServlet threw exception
java.lang.NullPointerException
	at org.apache.myfaces.renderkit.html.HtmlRendererUtils.selectContentType(HtmlRendererUtils.java:995)
	at org.apache.myfaces.renderkit.html.util.DefaultAddResource.writeResponse(DefaultAddResource.java:786)
	at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:143)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:514)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:394)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
	at java.lang.Thread.run(Thread.java:595)

> ExtensionsFilter calls addResource.parseResponse() on non-HTML responses
> ------------------------------------------------------------------------
>
>          Key: MYFACES-1114
>          URL: http://issues.apache.org/jira/browse/MYFACES-1114
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: Nightly
>     Reporter: Peter Mahoney
>     Assignee: Bruno Aranda
>      Fix For: Nightly
>  Attachments: extensions.patch
>
> ExtensionsFilter does not check the content type of the response before calling methods on AddResource to parse and add to the output. This causes the HTML parser to fall over when the response is non-HTML.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (MYFACES-1114) ExtensionsFilter calls addResource.parseResponse() on non-HTML responses

Posted by "Bruno Aranda (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1114?page=all ]
     
Bruno Aranda closed MYFACES-1114:
---------------------------------

    Fix Version: Nightly
     Resolution: Fixed

Patch applied. Many thanks Peter!

> ExtensionsFilter calls addResource.parseResponse() on non-HTML responses
> ------------------------------------------------------------------------
>
>          Key: MYFACES-1114
>          URL: http://issues.apache.org/jira/browse/MYFACES-1114
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: Nightly
>     Reporter: Peter Mahoney
>     Assignee: Bruno Aranda
>      Fix For: Nightly
>  Attachments: extensions.patch
>
> ExtensionsFilter does not check the content type of the response before calling methods on AddResource to parse and add to the output. This causes the HTML parser to fall over when the response is non-HTML.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (TOMAHAWK-132) ExtensionsFilter calls addResource.parseResponse() on non-HTML responses

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-132?page=all ]
     
Martin Marinschek closed TOMAHAWK-132:
--------------------------------------

    Fix Version: 1.1.2-SNAPSHOT
     Resolution: Fixed

Has been fixed to allow these additional content-types.

> ExtensionsFilter calls addResource.parseResponse() on non-HTML responses
> ------------------------------------------------------------------------
>
>          Key: TOMAHAWK-132
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-132
>      Project: MyFaces Tomahawk
>         Type: Bug
>     Reporter: Peter Mahoney
>     Assignee: Martin Marinschek
>      Fix For: 1.1.2-SNAPSHOT
>  Attachments: extensions.patch
>
> ExtensionsFilter does not check the content type of the response before calling methods on AddResource to parse and add to the output. This causes the HTML parser to fall over when the response is non-HTML.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (MYFACES-1114) ExtensionsFilter calls addResource.parseResponse() on non-HTML responses

Posted by "Bruno Aranda (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1114?page=all ]
     
Bruno Aranda reopened MYFACES-1114:
-----------------------------------


I closed without seeing your question Martin :)

> ExtensionsFilter calls addResource.parseResponse() on non-HTML responses
> ------------------------------------------------------------------------
>
>          Key: MYFACES-1114
>          URL: http://issues.apache.org/jira/browse/MYFACES-1114
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: Nightly
>     Reporter: Peter Mahoney
>     Assignee: Bruno Aranda
>      Fix For: Nightly
>  Attachments: extensions.patch
>
> ExtensionsFilter does not check the content type of the response before calling methods on AddResource to parse and add to the output. This causes the HTML parser to fall over when the response is non-HTML.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-1114) ExtensionsFilter calls addResource.parseResponse() on non-HTML responses

Posted by "Peter Mahoney (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1114?page=comments#action_12366312 ] 

Peter Mahoney commented on MYFACES-1114:
----------------------------------------

Yes, text/html only is too restrictive. So the content types that should be included are perhaps:
text/html
application/xhtml+xml
application/xml
text/xml


> ExtensionsFilter calls addResource.parseResponse() on non-HTML responses
> ------------------------------------------------------------------------
>
>          Key: MYFACES-1114
>          URL: http://issues.apache.org/jira/browse/MYFACES-1114
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: Nightly
>     Reporter: Peter Mahoney
>     Assignee: Bruno Aranda
>      Fix For: Nightly
>  Attachments: extensions.patch
>
> ExtensionsFilter does not check the content type of the response before calling methods on AddResource to parse and add to the output. This causes the HTML parser to fall over when the response is non-HTML.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-1114) ExtensionsFilter calls addResource.parseResponse() on non-HTML responses

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1114?page=comments#action_12366210 ] 

Martin Marinschek commented on MYFACES-1114:
--------------------------------------------

But what about xml as a content-type?

regards,

Martin

> ExtensionsFilter calls addResource.parseResponse() on non-HTML responses
> ------------------------------------------------------------------------
>
>          Key: MYFACES-1114
>          URL: http://issues.apache.org/jira/browse/MYFACES-1114
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: Nightly
>     Reporter: Peter Mahoney
>  Attachments: extensions.patch
>
> ExtensionsFilter does not check the content type of the response before calling methods on AddResource to parse and add to the output. This causes the HTML parser to fall over when the response is non-HTML.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira