You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "volosied (via GitHub)" <gi...@apache.org> on 2025/03/19 18:55:29 UTC
[PR] Add null check for contentTypeListString [myfaces]
volosied opened a new pull request, #869:
URL: https://github.com/apache/myfaces/pull/869
The JavaDoc for this method:
https://docs.oracle.com/javaee/7/api/javax/faces/render/RenderKit.html#createResponseWriter-java.io.Writer-java.lang.String-java.lang.String-
Key Points:
`contentTypeList - an "Accept header style" list of content types for this response, or null if the RenderKit should choose the best fit. `
`[IllegalArgumentException](http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true) - if no matching content type can be found in contentTypeList, no appropriate content type can be found with the implementation dependent best fit algorithm, or no matching character encoding can be found for the argument characterEncoding.`
_______
The `contentTypeListString` is a parameter. If it is null, then we should should the best fit (i.e the default as in our case) as described in the javadoc.
If it's not null, then myfaces should continue to try to find a match as on line 289. (If `*/*` is Accepted, then use the default. Otherwise, if `*/*` is not accepted, then the IllegalArgumentException is thrown since not match was found)
I don't like this code, but it looks to work for me locally to pass the TCK test while still avoid the infinite loop.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@myfaces.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add null check for contentTypeListString [myfaces]
Posted by "volosied (via GitHub)" <gi...@apache.org>.
volosied commented on PR #869:
URL: https://github.com/apache/myfaces/pull/869#issuecomment-2737709398
@melloware when you have a moment, can you also test to ensure the infinite loop is avoided?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@myfaces.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add null check for contentTypeListString [myfaces]
Posted by "volosied (via GitHub)" <gi...@apache.org>.
volosied merged PR #869:
URL: https://github.com/apache/myfaces/pull/869
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@myfaces.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org