WIP updates from review
This commit is contained in:
parent
b7c8bcb92f
commit
d4dcd6a8c8
|
@ -488,8 +488,6 @@ public class MultiPartFormData
|
|||
* @param config the configuration.
|
||||
*/
|
||||
public void configure(MultiPartConfig config)
|
||||
{
|
||||
if (config != null)
|
||||
{
|
||||
parser.setMaxParts(config.getMaxParts());
|
||||
maxMemoryFileSize = config.getMaxMemoryPartSize();
|
||||
|
@ -501,7 +499,6 @@ public class MultiPartFormData
|
|||
complianceListener = config.getViolationListener();
|
||||
compliance = config.getMultiPartCompliance();
|
||||
}
|
||||
}
|
||||
|
||||
// Only used for testing.
|
||||
int getPartsSize()
|
||||
|
|
|
@ -41,8 +41,6 @@ public class HttpConnectionFactory extends AbstractConnectionFactory implements
|
|||
super(HttpVersion.HTTP_1_1.asString());
|
||||
_config = Objects.requireNonNull(config);
|
||||
installBean(_config);
|
||||
setUseInputDirectByteBuffers(_config.isUseInputDirectByteBuffers());
|
||||
setUseOutputDirectByteBuffers(_config.isUseOutputDirectByteBuffers());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -363,6 +363,10 @@ public class HttpChannelState implements HttpChannel, Components
|
|||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("onIdleTimeout {}", this, t);
|
||||
|
||||
// Too late?
|
||||
if (_request == null || _response == null)
|
||||
return null;
|
||||
|
||||
Runnable invokeOnContentAvailable = null;
|
||||
if (_readFailure == null)
|
||||
{
|
||||
|
@ -704,22 +708,24 @@ public class HttpChannelState implements HttpChannel, Components
|
|||
@Override
|
||||
public void succeeded()
|
||||
{
|
||||
HttpStream completeStream = null;
|
||||
Throwable failure = null;
|
||||
HttpStream stream = null;
|
||||
try (AutoLock ignored = _lock.lock())
|
||||
{
|
||||
assert _callbackCompleted;
|
||||
_streamSendState = StreamSendState.LAST_COMPLETE;
|
||||
if (_handling == null)
|
||||
{
|
||||
completeStream = _stream;
|
||||
stream = _stream;
|
||||
_stream = null;
|
||||
failure = _callbackFailure;
|
||||
|
||||
// TODO remove this before merging
|
||||
if (_callbackFailure != null)
|
||||
throw new IllegalStateException("failure in succeeded", _callbackFailure);
|
||||
}
|
||||
}
|
||||
|
||||
if (completeStream != null)
|
||||
completeStream(completeStream, failure);
|
||||
if (stream != null)
|
||||
completeStream(stream, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -967,7 +967,6 @@ public class HttpConnection extends AbstractMetaDataConnection implements Runnab
|
|||
_onRequest = stream.headerComplete();
|
||||
|
||||
// Should we delay dispatch until we have some content?
|
||||
// We should not delay if there is no content expect or client is expecting 100 or the response is already committed or the request buffer already has something in it to parse
|
||||
_delayedForContent = getHttpConfiguration().isDelayDispatchUntilContent() &&
|
||||
(_parser.getContentLength() > 0 || _parser.isChunking()) &&
|
||||
!stream._expects100Continue &&
|
||||
|
|
Loading…
Reference in New Issue