requestPacket.setRequestURI(getNonEmptyPath(uri));
} else {
requestPacket.setRequestURI(uri.toUrl());
}
final BodyHandler bodyHandler = isPayloadAllowed(method) ?
bodyHandlerFactory.getBodyHandler(request) :
null;
if (bodyHandler != null) {
final long contentLength = request.getContentLength();