New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Echo server socket close during client request #873
Comments
Just to be sure: you mean you want an option to just error out/close the connection without even an HTTP code reply? but as a percentage? there is a "closing server" already used for some test but that one is not conditional We could indeed add a close-before - the thing though is that the incoming request has to be parsed to figure that out, so that may not simulate what you're actually after? (if you wanted to close before even reading anything) |
@ldemailly the use case we'd like to simulate is no response being sent. We're okay if the request is parsed but we'd like for the socket to close before the response is sent out. |
@ldemailly I'm game to add a close-before option if you have any guidelines or requests or ideas on how to implement it. |
Sure, thanks. question is whether it's a variant on close= maybe it could be
remains the current behavior
for close first 100% or 5.3% respectively or a new option entirely that can be composed so you'd close after in some % and close before in some other % not sure... what's the best api vs complexity/too man flags and options |
AIUI /echo only has like 5 flags rn; I think we should add a new feature flag. We could call it break or something. I can put in a PR with a tentative name and we can slowly discuss a name for the API. |
My team would like to add a new feature to the /echo endpoint where we can close the socket during not after the request is processed.
Currently the close parameter allows us only to close the socket after the response is sent not during request processing.
close | close the socket after answering e.g close=true to close after all requests or close=5.3 to close after approximately 5.3% of requests
The text was updated successfully, but these errors were encountered: