Package org.apache.stanbol.commons.httpqueryheaders

Examples of org.apache.stanbol.commons.httpqueryheaders.OverwriteableHeaderHttpServletRequest


        } catch (ClassCastException e) {
            // no Http request -> ignore
            chain.doFilter(request, response);
            return;
        }
        OverwriteableHeaderHttpServletRequest wrapped = null;
        Enumeration<String> paramNames = request.getParameterNames();
        while(paramNames.hasMoreElements()) {
            String param = paramNames.nextElement();
            if(param != null && param.startsWith(HEARDER_PREFIX) && param.length() > HEARDER_PREFIX.length()+1){
                String header = param.substring(HEARDER_PREFIX.length());
                String[] values = request.getParameterValues(param);
                if(values != null && values.length > 0){
                    if(wrapped == null ){ //lazzy initialisation
                        wrapped = new OverwriteableHeaderHttpServletRequest(httpRequest);
                    }
                    wrapped.setHeader(header, values);
                }
            }
        }
        if(wrapped != null){
            chain.doFilter(wrapped, response);
View Full Code Here

TOP

Related Classes of org.apache.stanbol.commons.httpqueryheaders.OverwriteableHeaderHttpServletRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.