Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

Commit

Permalink
Pust push behind context-param com.sun.faces.enablePushResources, dis…
Browse files Browse the repository at this point in the history
…abled by default.

modified:   jsf-ri/src/main/java/com/sun/faces/application/ApplicationAssociate.java

- Modify checkForPushBuilder() to return false unless
  EnablePushResources is true.

modified:   jsf-ri/src/main/java/com/sun/faces/config/WebConfiguration.java

- Declare new BooleanWebContextParam
  • Loading branch information
Ed Burns committed May 25, 2017
1 parent e252af1 commit a6105c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,11 @@ public ApplicationAssociate(ApplicationImpl appImpl) {

private boolean checkForPushBuilder() {
boolean result = false;

if (!webConfig.isOptionEnabled(BooleanWebContextInitParameter.EnablePushResources)) {
return result;
}

Class clazz = HttpServletRequest.class;
try {
result = null != clazz.getMethod("newPushBuilder", (Class[]) null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,10 @@ public enum BooleanWebContextInitParameter {
"com.sun.faces.enableCoreTagLibValidator",
false
),
EnablePushResources(
"com.sun.faces.enablePushResources",
false
),
PreferXHTMLContentType(
"com.sun.faces.preferXHTML",
false
Expand Down

0 comments on commit a6105c3

Please sign in to comment.