[
https://issues.apache.org/jira/browse/MYFACES-4214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16463889#comment-16463889
]
Paul Nicolucci edited comment on MYFACES-4214 at 5/23/18 12:37 AM:
-------------------------------------------------------------------
If this isn't a bug in the JSF impl and fixed in the bridge code then I'd vote
to close "invalid".
was (Author: paul.nicolucci):
If this isn't a bug in the JSF impl and fixed in the bridge code then I'd vote
to close "Won't fix".
> The wrong content type of "text/html" is set for Ajax responses
> ---------------------------------------------------------------
>
> Key: MYFACES-4214
> URL: https://issues.apache.org/jira/browse/MYFACES-4214
> Project: MyFaces Core
> Issue Type: Improvement
> Components: General, Portlet_Support
> Affects Versions: 2.2.12, 2.3.0, 2.3.1
> Reporter: Kyle Stiemann
> Assignee: Thomas Andraschko
> Priority: Minor
>
> h2. Steps to reproduce:
> # Clone the
> [wrong-content-type-ajax-excecute-all-reproducer|https://github.com/stiemannkj1/wrong-content-type-ajax-excecute-all-reproducer]
> project:
> {code}
> git clone
> https://github.com/stiemannkj1/wrong-content-type-ajax-excecute-all-reproducer.git
> {code}
> # Build the project:
> {code}
> cd wrong-content-type-ajax-excecute-all-reproducer && mvn clean package -P
> myfaces
> {code}
> # Deploy the project to Tomcat:
> {code}
> cp target/*.war
> $TOMCAT_HOME/webapps/wrong-content-type-ajax-excecute-all-reproducer.war
> {code}
> # Navigate to the deployed webapp at
> [http://localhost:8080/wrong-content-type-ajax-excecute-all-reproducer/|http://localhost:8080/wrong-content-type-ajax-excecute-all-reproducer/].
> # Note that the _External Context Calls:_ show that
> \{{setResponseContentType("text/html")}} was correctly called before the
> first call to \{{getResponseOutputWriter()}}.
> # Click the _Execute (default) Ajax Request_ button.
> # Note the _External Context Calls:_.
> # Click the _Execute @all Ajax Request_ button.
> If the bug still exists, the _External Context Calls:_ will show that
> \{{setResponseContentType("text/html")}} was *incorrectly* called before the
> first call to \{{getResponseOutputWriter()}} during Ajax requests.
> If the bug is fixed, the _External Context Calls:_ will show that
> \{{setResponseContentType("text/xml")}} was called immediately before the
> first call to \{{getResponseOutputWriter()}}.
> h2. Additional Information:
> This issue does not affect Servlets but it does affect portlets which do not
> allow changing the content type after the first call to
> {{ExternalContext.getResponseOutputWriter()}} (Portlet Spec 3.0 Section
> _15.5.1 Content Type_):
> {quote}
> The {{setContentType}} method must be called before the {{getWriter}} or
> {{getPortletOutputStream}} methods. Otherwise, the method will have no effect.
> {quote}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)