File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ func setContentType(r *http.Request, resp *http.Response) {
189189 if element == e {
190190 resp .Header .Set ("Content-Encoding" , "br" )
191191 // Try and use the previous ending for content type, if exists
192- prevExt := strings .TrimSuffix (strings .ToLower (fname ), "." + e )
192+ prevExt := filepath . Ext ( strings .TrimSuffix (strings .ToLower (fname ), "." + e ) )
193193 if prevExt != "" {
194194 prevMime := serverSettings .ExtMimeTypes [prevExt [1 :]]
195195 if prevMime != "" {
@@ -222,7 +222,7 @@ func setContentType(r *http.Request, resp *http.Response) {
222222 if element == e {
223223 resp .Header .Set ("Content-Encoding" , "br" )
224224 // Try and use the previous ending for content type, if exists
225- prevExt := strings .TrimSuffix (strings .ToLower (fnameHeader ), "." + e )
225+ prevExt := filepath . Ext ( strings .TrimSuffix (strings .ToLower (fnameHeader ), "." + e ) )
226226 if prevExt != "" {
227227 prevMime := serverSettings .ExtMimeTypes [prevExt [1 :]]
228228 if prevMime != "" {
You can’t perform that action at this time.
0 commit comments