@Override public int contentLength() { return delegate.contentLength(); }
protected void verifyContentType(Request request, Response response) throws IOException { if (!UPDATE_HTTP_METHODS.contains(request.requestMethod().toUpperCase())) { return; } boolean requestHasBody = request.contentLength() >= 1 || request.raw().getInputStream().available() >= 1 || "chunked".equalsIgnoreCase(request.headers("Transfer-Encoding")); if (requestHasBody) { if (!isJsonContentType(request)) { throw haltBecauseJsonContentTypeExpected(); } } else if (request.headers().stream().noneMatch(headerName -> headerName.toLowerCase().equals("x-gocd-confirm"))) { throw haltBecauseConfirmHeaderMissing(); } }
@Override public int contentLength() { return delegate.contentLength(); }
@Override public int contentLength() { return delegate.contentLength(); }
logger.debug(" contentType() = '{}'", request.contentType()); logger.debug(" params() = '{}'", request.params()); logger.debug(" body contentLenght() = {}", request.contentLength());