/** * End the current request. */ @Override public long end() throws IOException { long swallowed = 0; int read = 0; // Consume extra bytes : parse the stream until the end chunk is found while ((read = doRead(this)) >= 0) { swallowed += read; if (maxSwallowSize > -1 && swallowed > maxSwallowSize) { throwIOException(sm.getString("inputFilter.maxSwallow")); } } // Return the number of extra bytes which were consumed return readChunk.remaining(); }
if (readChunk == null || readChunk.position() >= readChunk.limit()) { if (readBytes() <= 0) { throwIOException(sm.getString("chunkedInputFilter.invalidCrlfNoData")); if (chr == Constants.CR) { if (crfound) { throwIOException(sm.getString("chunkedInputFilter.invalidCrlfCRCR")); throwIOException(sm.getString("chunkedInputFilter.invalidCrlfNoCR")); throwIOException(sm.getString("chunkedInputFilter.invalidCrlf"));
throwIOException(sm.getString("chunkedInputFilter.maxExtension"));
throwIOException(sm.getString("chunkedInputFilter.invalidHeader")); throwIOException(sm.getString("chunkedInputFilter.eos"));
throwIOException(sm.getString("chunkedInputFilter.maxTrailer"));