@@ -86,14 +86,14 @@ func LoggerHandler(level log.Level) func(next http.Handler) http.Handler {
86
86
return http .HandlerFunc (func (w http.ResponseWriter , req * http.Request ) {
87
87
start := time .Now ()
88
88
89
- _ = log .GetLogger ("router" ).Log (0 , level , "Started %s %s for %s" , log .ColoredMethod (req .Method ), req .RequestURI , req .RemoteAddr )
89
+ _ = log .GetLogger ("router" ).Log (0 , level , "Started %s %s for %s" , log .ColoredMethod (req .Method ), req .URL . RequestURI () , req .RemoteAddr )
90
90
91
91
next .ServeHTTP (w , req )
92
92
93
93
ww := middleware .NewWrapResponseWriter (w , req .ProtoMajor )
94
94
95
95
status := ww .Status ()
96
- _ = log .GetLogger ("router" ).Log (0 , level , "Completed %s %s %v %s in %v" , log .ColoredMethod (req .Method ), req .RequestURI , log .ColoredStatus (status ), log .ColoredStatus (status , http .StatusText (status )), log .ColoredTime (time .Since (start )))
96
+ _ = log .GetLogger ("router" ).Log (0 , level , "Completed %s %s %v %s in %v" , log .ColoredMethod (req .Method ), req .URL . RequestURI () , log .ColoredStatus (status ), log .ColoredStatus (status , http .StatusText (status )), log .ColoredTime (time .Since (start )))
97
97
})
98
98
}
99
99
}
@@ -107,12 +107,12 @@ func storageHandler(storageSetting setting.Storage, prefix string, objStore stor
107
107
return
108
108
}
109
109
110
- if ! strings .HasPrefix (req .RequestURI , "/" + prefix ) {
110
+ if ! strings .HasPrefix (req .URL . RequestURI () , "/" + prefix ) {
111
111
next .ServeHTTP (w , req )
112
112
return
113
113
}
114
114
115
- rPath := strings .TrimPrefix (req .RequestURI , "/" + prefix )
115
+ rPath := strings .TrimPrefix (req .URL . RequestURI () , "/" + prefix )
116
116
u , err := objStore .URL (rPath , path .Base (rPath ))
117
117
if err != nil {
118
118
if os .IsNotExist (err ) || errors .Is (err , os .ErrNotExist ) {
@@ -139,12 +139,12 @@ func storageHandler(storageSetting setting.Storage, prefix string, objStore stor
139
139
return
140
140
}
141
141
142
- if ! strings .HasPrefix (req .RequestURI , "/" + prefix ) {
142
+ if ! strings .HasPrefix (req .URL . RequestURI () , "/" + prefix ) {
143
143
next .ServeHTTP (w , req )
144
144
return
145
145
}
146
146
147
- rPath := strings .TrimPrefix (req .RequestURI , "/" + prefix )
147
+ rPath := strings .TrimPrefix (req .URL . RequestURI () , "/" + prefix )
148
148
rPath = strings .TrimPrefix (rPath , "/" )
149
149
150
150
fi , err := objStore .Stat (rPath )
0 commit comments