예제 #1
0
  public DataChunk getDecodedRequestURIBC(
      final boolean isSlashAllowed, final boolean isBackSlashAllowed, final Charset charset)
      throws CharConversionException {

    if (isDecoded
        && isSlashAllowed == wasSlashAllowed
        && isBackSlashAllowed == wasBackSlashAllowed
        && charset == decodedURIEncoding) {
      return decodedRequestURIDC;
    }

    checkDecodedURICapacity(requestURIDC.getLength());
    decodedRequestURIDC.setBytes(preallocatedDecodedURIBuffer);

    HttpRequestURIDecoder.decode(
        requestURIDC, decodedRequestURIDC, isSlashAllowed, isBackSlashAllowed, charset);

    isDecoded = true;
    wasSlashAllowed = isSlashAllowed;
    wasBackSlashAllowed = isBackSlashAllowed;

    decodedURIEncoding = charset;
    return decodedRequestURIDC;
  }
예제 #2
0
 public void init(final byte[] input, final int start, final int end) {
   originalRequestURIDC.setBytes(input, start, end);
   requestURIDC.setBytes(input, start, end);
 }