/** * Configure the {@link WebappContext} * and {@link ServletConfigImpl} * * @throws javax.servlet.ServletException Error while configuring * {@link Servlet}. */ protected void configureServletEnv() throws ServletException { if (contextPath.length() > 0) { final CharChunk cc = new CharChunk(); char[] ch = contextPath.toCharArray(); cc.setChars(ch, 0, ch.length); HttpRequestURIDecoder.normalizeChars(cc); contextPath = cc.toString(); } if ("".equals(contextPath)) { contextPath = ""; } }
/** * Configure the {@link WebappContext} * and {@link ServletConfigImpl} * * @throws javax.servlet.ServletException Error while configuring * {@link Servlet}. */ protected void configureServletEnv() throws ServletException { if (contextPath.length() > 0) { final CharChunk cc = new CharChunk(); char[] ch = contextPath.toCharArray(); cc.setChars(ch, 0, ch.length); HttpRequestURIDecoder.normalizeChars(cc); contextPath = cc.toString(); } if ("".equals(contextPath)) { contextPath = ""; } }
/** * Configure the {@link WebappContext} * and {@link ServletConfigImpl} * * @throws javax.servlet.ServletException Error while configuring * {@link Servlet}. */ protected void configureServletEnv() throws ServletException { if (contextPath.length() > 0) { final CharChunk cc = new CharChunk(); char[] ch = contextPath.toCharArray(); cc.setChars(ch, 0, ch.length); HttpRequestURIDecoder.normalizeChars(cc); contextPath = cc.toString(); } if ("".equals(contextPath)) { contextPath = ""; } }
/** * Configure the {@link WebappContext} * and {@link ServletConfigImpl} * * @throws javax.servlet.ServletException Error while configuring * {@link Servlet}. */ protected void configureServletEnv() throws ServletException { if (contextPath.length() > 0) { final CharChunk cc = new CharChunk(); char[] ch = contextPath.toCharArray(); cc.setChars(ch, 0, ch.length); HttpRequestURIDecoder.normalizeChars(cc); contextPath = cc.toString(); } if ("".equals(contextPath)) { contextPath = ""; } }
/** * Configure the {@link WebappContext} * and {@link ServletConfigImpl} * * @throws javax.servlet.ServletException Error while configuring * {@link Servlet}. */ protected void configureServletEnv() throws ServletException { if (contextPath.length() > 0) { final CharChunk cc = new CharChunk(); char[] ch = contextPath.toCharArray(); cc.setChars(ch, 0, ch.length); HttpRequestURIDecoder.normalizeChars(cc); contextPath = cc.toString(); } if ("".equals(contextPath)) { contextPath = ""; } }
/** * Configure the {@link WebappContext} * and {@link ServletConfigImpl} * * @throws javax.servlet.ServletException Error while configuring * {@link Servlet}. */ protected void configureServletEnv() throws ServletException { if (contextPath.length() > 0) { final CharChunk cc = new CharChunk(); char[] ch = contextPath.toCharArray(); cc.setChars(ch, 0, ch.length); HttpRequestURIDecoder.normalizeChars(cc); contextPath = cc.toString(); } if ("".equals(contextPath)) { contextPath = ""; } }
/** * Normalize URI. * <p> * This method normalizes "\", "//", "/./" and "/../". This method will * return false when trying to go above the root, or if the URI contains * a null byte. * * @param uriMB URI to be normalized * @return <tt>true</tt> if normalization was successful, or <tt>false</tt> otherwise */ public static boolean normalize(MessageBytes uriMB) { int type = uriMB.getType(); if (type == MessageBytes.T_CHARS) { return normalizeChars(uriMB.getCharChunk()); } else { return normalizeBytes(uriMB.getByteChunk()); } }
/** * Normalize URI. * <p> * This method normalizes "\", "//", "/./" and "/../". This method will * return false when trying to go above the root, or if the URI contains * a null byte. * * @param uriMB URI to be normalized * @return <tt>true</tt> if normalization was successful, or <tt>false</tt> otherwise */ public static boolean normalize(MessageBytes uriMB) { int type = uriMB.getType(); if (type == MessageBytes.T_CHARS) { return normalizeChars(uriMB.getCharChunk()); } else { return normalizeBytes(uriMB.getByteChunk()); } }
/** * Normalize URI. * <p> * This method normalizes "\", "//", "/./" and "/../". This method will * return false when trying to go above the root, or if the URI contains * a null byte. * * @param uriMB URI to be normalized * @return <tt>true</tt> if normalization was successful, or <tt>false</tt> otherwise */ public static boolean normalize(MessageBytes uriMB) { int type = uriMB.getType(); if (type == MessageBytes.T_CHARS) { return normalizeChars(uriMB.getCharChunk()); } else { return normalizeBytes(uriMB.getByteChunk()); } }
/** * Normalize URI. * <p> * This method normalizes "\", "//", "/./" and "/../". This method will * return false when trying to go above the root, or if the URI contains * a null byte. * * @param uriMB URI to be normalized * @return <tt>true</tt> if normalization was successful, or <tt>false</tt> otherwise */ public static boolean normalize(MessageBytes uriMB) { int type = uriMB.getType(); if (type == MessageBytes.T_CHARS) { return normalizeChars(uriMB.getCharChunk()); } else { return normalizeBytes(uriMB.getByteChunk()); } }
/** * Normalize URI. * <p> * This method normalizes "\", "//", "/./" and "/../". This method will * return false when trying to go above the root, or if the URI contains * a null byte. * * @param uriMB URI to be normalized * @return <tt>true</tt> if normalization was successful, or <tt>false</tt> otherwise */ public static boolean normalize(MessageBytes uriMB) { int type = uriMB.getType(); if (type == MessageBytes.T_CHARS) { return normalizeChars(uriMB.getCharChunk()); } else { return normalizeBytes(uriMB.getByteChunk()); } }
/** * Normalize URI. * <p> * This method normalizes "\", "//", "/./" and "/../". This method will * return false when trying to go above the root, or if the URI contains * a null byte. * * @param uriMB URI to be normalized * @return <tt>true</tt> if normalization was successful, or <tt>false</tt> otherwise */ public static boolean normalize(MessageBytes uriMB) { int type = uriMB.getType(); if (type == MessageBytes.T_CHARS) { return normalizeChars(uriMB.getCharChunk()); } else { return normalizeBytes(uriMB.getByteChunk()); } }
/** * Normalize URI. * <p> * This method normalizes "\", "//", "/./" and "/../". This method will * return false when trying to go above the root, or if the URI contains * a null byte. * * @param uriMB URI to be normalized * @return <tt>true</tt> if normalization was successful, or <tt>false</tt> otherwise */ public static boolean normalize(MessageBytes uriMB) { int type = uriMB.getType(); if (type == MessageBytes.T_CHARS) { return normalizeChars(uriMB.getCharChunk()); } else { return normalizeBytes(uriMB.getByteChunk()); } }
/** * Normalize URI. * <p> * This method normalizes "\", "//", "/./" and "/../". This method will * return false when trying to go above the root, or if the URI contains * a null byte. * * @param uriMB URI to be normalized * @return <tt>true</tt> if normalization was successful, or <tt>false</tt> otherwise */ public static boolean normalize(MessageBytes uriMB) { int type = uriMB.getType(); if (type == MessageBytes.T_CHARS) { return normalizeChars(uriMB.getCharChunk()); } else { return normalizeBytes(uriMB.getByteChunk()); } }
/** * Normalize URI. * <p> * This method normalizes "\", "//", "/./" and "/../". This method will * return false when trying to go above the root, or if the URI contains * a null byte. * * @param uriMB URI to be normalized * @return <tt>true</tt> if normalization was successful, or <tt>false</tt> otherwise */ public static boolean normalize(MessageBytes uriMB) { int type = uriMB.getType(); if (type == MessageBytes.T_CHARS) { return normalizeChars(uriMB.getCharChunk()); } else { return normalizeBytes(uriMB.getByteChunk()); } }
/** * Normalize URI. * <p> * This method normalizes "\", "//", "/./" and "/../". This method will * return false when trying to go above the root, or if the URI contains * a null byte. * * @param uriMB URI to be normalized * @return <tt>true</tt> if normalization was successful, or <tt>false</tt> otherwise */ public static boolean normalize(MessageBytes uriMB) { int type = uriMB.getType(); if (type == MessageBytes.T_CHARS) { return normalizeChars(uriMB.getCharChunk()); } else { return normalizeBytes(uriMB.getByteChunk()); } }
/** * Normalize URI. * <p> * This method normalizes "\", "//", "/./" and "/../". This method will * return false when trying to go above the root, or if the URI contains * a null byte. * * @param dataChunk URI to be normalized * @return <tt>true</tt> if normalization was successful, or <tt>false</tt> otherwise */ public static boolean normalize(final DataChunk dataChunk) { switch (dataChunk.getType()) { case Bytes: return normalizeBytes(dataChunk.getByteChunk()); case Buffer: return normalizeBuffer(dataChunk.getBufferChunk()); case String: try { dataChunk.toChars(null); } catch (CharConversionException unexpected) { // should never occur throw new IllegalStateException("Unexpected exception", unexpected); } // pass to Chars case case Chars: return normalizeChars(dataChunk.getCharChunk()); default: throw new NullPointerException(); } }
/** * Normalize URI. * <p> * This method normalizes "\", "//", "/./" and "/../". This method will * return false when trying to go above the root, or if the URI contains * a null byte. * * @param dataChunk URI to be normalized * @return <tt>true</tt> if normalization was successful, or <tt>false</tt> otherwise */ public static boolean normalize(final DataChunk dataChunk) { switch (dataChunk.getType()) { case Bytes: return normalizeBytes(dataChunk.getByteChunk()); case Buffer: return normalizeBuffer(dataChunk.getBufferChunk()); case String: try { dataChunk.toChars(null); } catch (CharConversionException unexpected) { // should never occur throw new IllegalStateException("Unexpected exception", unexpected); } // pass to Chars case case Chars: return normalizeChars(dataChunk.getCharChunk()); default: throw new NullPointerException(); } }
/** * Normalize URI. * <p> * This method normalizes "\", "//", "/./" and "/../". This method will * return false when trying to go above the root, or if the URI contains * a null byte. * * @param dataChunk URI to be normalized * @return <tt>true</tt> if normalization was successful, or <tt>false</tt> otherwise */ public static boolean normalize(final DataChunk dataChunk) { switch (dataChunk.getType()) { case Bytes: return normalizeBytes(dataChunk.getByteChunk()); case Buffer: return normalizeBuffer(dataChunk.getBufferChunk()); case String: try { dataChunk.toChars(null); } catch (CharConversionException unexpected) { // should never occur throw new IllegalStateException("Unexpected exception", unexpected); } // pass to Chars case case Chars: return normalizeChars(dataChunk.getCharChunk()); default: throw new NullPointerException(); } }
/** * Normalize URI. * <p> * This method normalizes "\", "//", "/./" and "/../". This method will * return false when trying to go above the root, or if the URI contains * a null byte. * * @param dataChunk URI to be normalized * @return <tt>true</tt> if normalization was successful, or <tt>false</tt> otherwise */ public static boolean normalize(final DataChunk dataChunk) { switch (dataChunk.getType()) { case Bytes: return normalizeBytes(dataChunk.getByteChunk()); case Buffer: return normalizeBuffer(dataChunk.getBufferChunk()); case String: try { dataChunk.toChars(null); } catch (CharConversionException unexpected) { // should never occur throw new IllegalStateException("Unexpected exception", unexpected); } // pass to Chars case case Chars: return normalizeChars(dataChunk.getCharChunk()); default: throw new NullPointerException(); } }