File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -128,11 +128,23 @@ func (mux *Mux) ServeHTTP(res http.ResponseWriter, req *http.Request) {
128128 // root is a special case because it is the top node in the tree
129129 if req .URL .Path == slash || req .URL .Path == empty {
130130 if nil != tr .handlers { // root match
131- (& Context {handler : - 1 , mux : mux , tree : tr }).Next ()
131+ (& Context {
132+ handler : - 1 ,
133+ mux : mux ,
134+ tree : tr ,
135+ ResponseWriter : res ,
136+ Request : req ,
137+ }).Next ()
132138 return
133139 } else if wild := tr .children [wildcard ]; nil != wild {
134140 // root level wildcard pattern match
135- (& Context {handler : - 1 , mux : mux , tree : wild }).Next ()
141+ (& Context {
142+ handler : - 1 ,
143+ mux : mux ,
144+ tree : wild ,
145+ ResponseWriter : res ,
146+ Request : req ,
147+ }).Next ()
136148 return
137149 }
138150 http .NotFound (res , req )
You can’t perform that action at this time.
0 commit comments