mirror of
https://github.com/apple/swift-nio-extras
synced 2026-11-25 04:47:50 +00:00
### Motivation: The SimpleResponsivenessRequestMux knows how to handle a few different requests. For those it doesn’t know how to handle, it responds with a 404. It would be helpful if the handler had a mode where it optionally forwards requests it doesn’t know how to handle to a fallback channel handler so that users can respond to these requests. ### Modifications: The mux has a new initializer that can configure it to accept unexpected requests, i.e., those not defined by itself. In this case it will forward requests down the pipeline. However, its default behavior remains the same: respond with a 404. ### Result: When setting up the mux, users can add additional handler to the pipeline and configure the mux to forward its requests.