You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thats not compatible with axum being based on tower. tower::Service is pretty strictly async fn(Request) -> Response. Any other optimization would require that you interact with hyper, not axum.
You can try to control underlying stream by using a wrapper stream. Here is an example to do request header read timeouts. With more effort you can write custom stuff using same principle. You might get into fight with underlying hyper implementation about who is writing stuff so be careful.
Feature Request
Motivation
I am trying to use sendfile syscall to serve static file (tower issue link), which require access to response TcpStream.
Proposal
Currently, axum require request handler to return an object implement IntoResponse, and the framework will write it to response TcpStream.
I wish the axum could provide a way to access response TcpStream in request handler.
Alternatives
Use the current 2 copy implementation.
The text was updated successfully, but these errors were encountered: