mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-27 23:03:37 -05:00
fastcgi: Case-insensitive extension comparison
This commit is contained in:
parent
cc63eca0c8
commit
832df649c1
1 changed files with 2 additions and 1 deletions
|
@ -102,7 +102,8 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// These criteria work well in this order for PHP sites
|
// These criteria work well in this order for PHP sites
|
||||||
if !h.exists(fpath) || fpath[len(fpath)-1] == '/' || strings.HasSuffix(fpath, rule.Ext) {
|
// We lower path and Ext as on Windows, the system is case insensitive, so .PHP is served as .php
|
||||||
|
if !h.exists(fpath) || fpath[len(fpath)-1] == '/' || strings.HasSuffix(strings.ToLower(fpath), strings.ToLower(rule.Ext)) {
|
||||||
|
|
||||||
// Create environment for CGI script
|
// Create environment for CGI script
|
||||||
env, err := h.buildEnv(r, rule, fpath)
|
env, err := h.buildEnv(r, rule, fpath)
|
||||||
|
|
Loading…
Add table
Reference in a new issue