[ https://issues.apache.org/jira/browse/HTTPCORE-639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17165966#comment-17165966 ]
Carter Kozak commented on HTTPCORE-639: --------------------------------------- I've started trying to write a test for this mechanism and discovered that while tests pass on java 8 and 11, my test failed on java 14. I believe this is the result of [https://openjdk.java.net/jeps/353] which refactored the socket API. I will file a separate issue for this. The fix should be replacing the instanceof SSLSocket check with an "socketInputStream is not an instance of FileInputStream" check, which covers the existing cases, as well as java 14 plain sockets. > Consider a configurable ResponseOutOfOrder strategy for > DefaultBHttpClientConnection > ------------------------------------------------------------------------------------ > > Key: HTTPCORE-639 > URL: https://issues.apache.org/jira/browse/HTTPCORE-639 > Project: HttpComponents HttpCore > Issue Type: New Feature > Components: HttpCore > Reporter: Carter Kozak > Priority: Major > Fix For: 5.1 > > > In a known environment where the server fully reads full request bodies > before sending a response, I would like to disable the expensive > checkForEarlyResponse checks implemented by > DefaultBHttpClientConnection.sendRequestEntity. > Using TLS the check blocks for 1ms every 8kb, which limits the upload rate to > at most eight megabytes per second, relatively low in a data-center > environment. > Proposed interface: > {code:java} > public interface ResponseOutOfOrderStrategy { > /** > * Returns the interval in bytes describing how often the socket is > checked for an out-of-order response. > * The default implementation uses 8kb. A value of zero results in checks > being disabled, this may result > * in requests blocking until the socket timeout is reached while a > server sends an out-of-order response. > */ > int determineResponseCheckIntervalBytes(ClassicHttpRequest request, > Socket socket); > } > {code} > I'd be happy to implement and contribute such a feature if you agree that > it's reasonable. > I appreciate any input and feedback you can provide! -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org