carterkozak commented on pull request #206:
URL: 
https://github.com/apache/httpcomponents-core/pull/206#issuecomment-666846805


   I like the idea of moving the logic into an implementation of this 
interface, but I'm not sure I fully understand the proposed interface. The two 
proposed methods are tightly coupled, would it make sense to provide a single 
method that takes the connection, request, socketInputStream, and totalBytes, 
and does the check if necessarily, otherwise no-ops?
   
   Taking that model a step farther, we could use an interface along these 
lines:
   
   ```
   interface ResponseOutOfOrderStrategy {
       OutputStream create(
           SocketHolder socketHolder,
           BHttpConnection connection,
           ClassicHttpRequest request);
   }
   ```
   
   This way the entirety of the response checking code can be encapsulated. 
This interface is broad and could end up being used incorrectly, but it doesn't 
require that we create unnecessary OutputStream wrappers when the feature is 
disabled. What do you think?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to