|
|
@ -74,16 +74,14 @@ func New() *Mux { |
|
|
|
|
|
|
|
|
func (m *Mux) ServeHTTP(w http.ResponseWriter, r *http.Request) { |
|
|
func (m *Mux) ServeHTTP(w http.ResponseWriter, r *http.Request) { |
|
|
stack := m.mStack.alloc() |
|
|
stack := m.mStack.alloc() |
|
|
defer m.mStack.release(stack) |
|
|
|
|
|
|
|
|
|
|
|
stack.ServeHTTP(w, r) |
|
|
stack.ServeHTTP(w, r) |
|
|
|
|
|
m.mStack.release(stack) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// ServeHTTPC creates a context dependent request with the given Mux. Satisfies
|
|
|
// ServeHTTPC creates a context dependent request with the given Mux. Satisfies
|
|
|
// the web.Handler interface.
|
|
|
// the web.Handler interface.
|
|
|
func (m *Mux) ServeHTTPC(c C, w http.ResponseWriter, r *http.Request) { |
|
|
func (m *Mux) ServeHTTPC(c C, w http.ResponseWriter, r *http.Request) { |
|
|
stack := m.mStack.alloc() |
|
|
stack := m.mStack.alloc() |
|
|
defer m.mStack.release(stack) |
|
|
|
|
|
|
|
|
|
|
|
stack.ServeHTTPC(c, w, r) |
|
|
stack.ServeHTTPC(c, w, r) |
|
|
|
|
|
m.mStack.release(stack) |
|
|
} |
|
|
} |