Github user klopfdreh commented on a diff in the pull request:

    https://github.com/apache/wicket/pull/225#discussion_r130393784
  
    --- Diff: 
wicket-experimental/wicket-http2/wicket-http2-core/src/main/java/org/apache/wicket/http2/markup/head/PushHeaderItem.java
 ---
    @@ -361,7 +366,32 @@ else if (url.toString().startsWith("."))
                                        url = url.toString().substring(1);
                                }
     
    -                           urls.add(url.toString());
    +                           // The context path and the filter have to be 
applied to the URL, because otherwise
    +                           // the resource is not pushed correctly
    +                           StringBuffer partialUrl = new StringBuffer();
    +                           String contextPath = 
WebApplication.get().getServletContext().getContextPath();
    +                           partialUrl.append(contextPath);
    +                           if (!contextPath.equals("/"))
    +                           {
    +                                   partialUrl.append("/");
    +                           }
    +                           String filterPath = 
WebApplication.get().getWicketFilter().getFilterPath();
    +                           if (filterPath.equals("/"))
    +                           {
    +                                   filterPath = "";
    +                           }
    +                           else if (filterPath.endsWith("/"))
    +                           {
    +                                   filterPath = 
filterPath.replaceAll(".$", "");
    +                           }
    +                           partialUrl.append(filterPath);
    --- End diff --
    
    I used those:
    ```java
    WebApplication.get().getServletContext().getContextPath();
    WebApplication.get().getWicketFilter().getFilterPath();
    ```
    
    and build the path by my self.
    
    Can you have a look at the implementation if this is ok?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to