Alon Bar-Lev has posted comments on this change. Change subject: engine: Add header to each response. ......................................................................
Patch Set 2: Code-Review+1 (3 comments) http://gerrit.ovirt.org/#/c/25937/2/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/servlet/HeaderFilter.java File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/servlet/HeaderFilter.java: Line 90: HttpServletResponse res = (HttpServletResponse) response; Line 91: for (Map.Entry<String, String> entry: headerValueMap.entrySet()) { Line 92: res.addHeader(entry.getKey(), entry.getValue()); Line 93: } Line 94: chain.doFilter(request, response); > No I have to do them before the chain, as the servlet will commit the respo ok Line 95: } Line 96: Line 97: @Override Line 98: public void init(FilterConfig filterConfig) throws ServletException { http://gerrit.ovirt.org/#/c/25937/2/backend/manager/modules/welcome/src/main/webapp/WEB-INF/web.xml File backend/manager/modules/welcome/src/main/webapp/WEB-INF/web.xml: Line 81: Line 82: <filter-mapping> Line 83: <filter-name>HeaderFilter</filter-name> Line 84: <url-pattern>/*</url-pattern> Line 85: </filter-mapping> > There is no relationship between those filters, and thus the order doesn't as long as headers are not put in the other filters... well ok... for now... but out of curiosity is there a directive to control the order? Line 86: Line 87: <filter-mapping> Line 88: <filter-name>LocaleFilter</filter-name> Line 89: <url-pattern>/*</url-pattern> http://gerrit.ovirt.org/#/c/25937/2/frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/web.xml File frontend/webadmin/modules/webadmin/src/main/webapp/WEB-INF/web.xml: Line 62: Line 63: <filter-mapping> Line 64: <filter-name>HeaderFilter</filter-name> Line 65: <url-pattern>/*</url-pattern> Line 66: </filter-mapping> > Only some of the other entries use tabs, we can definitely create a new pat ok... please do, no reason to keep this mess... Line 67: Line 68: <servlet-mapping> Line 69: <servlet-name>WebAdminHostPageServlet</servlet-name> Line 70: <url-pattern>/WebAdmin.html</url-pattern> -- To view, visit http://gerrit.ovirt.org/25937 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4e9c26dddd0d0300d6b3d078ae763b78600f25d1 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alexander Wels <[email protected]> Gerrit-Reviewer: Alexander Wels <[email protected]> Gerrit-Reviewer: Alon Bar-Lev <[email protected]> Gerrit-Reviewer: Einav Cohen <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
