mirror of
https://github.com/soypat/lneto.git
synced 2026-08-19 14:14:07 +00:00
httphi router refactor (#176)
* httphi: RouterConfig refactor to enable DefaultRouterConfig * RequestHeader not case sensitive anymore * httphi: use DefaultRouterConfig in examples * httphi: remove gated stage complexity Misusing Stage methods by calling them once header has been written is totally harmless as far as I can tell. We simplify the codebase on this occasion by removing the headerWritten check for all stage methods * httphi: improve APIs * httphi: remove status
This commit is contained in:
@@ -218,7 +218,7 @@ func TestHandleRequestFields(t *testing.T) {
|
||||
var sm MuxSlice
|
||||
route, _, _ := strings.Cut(test.wantURI, "?") // Mux matches on path.
|
||||
sm.Handle(route, func(ex *Exchange) {
|
||||
gotMethod = string(ex.RequestMethodRaw())
|
||||
gotMethod = string(ex.RequestMethodBytes())
|
||||
gotURI = string(ex.RequestTarget())
|
||||
gotHost = string(ex.RequestHeader("Host"))
|
||||
ex.WriteHeader(200)
|
||||
|
||||
Reference in New Issue
Block a user