diff options
author | marliotto <[email protected]> | 2020-01-27 16:04:26 +0300 |
---|---|---|
committer | marliotto <[email protected]> | 2020-01-27 16:04:26 +0300 |
commit | e00d36c57c1227e614b0572ab0c0df98032f4298 (patch) | |
tree | 46d61d1db03692f3c75f931d290471f333f8fa2c /service/http/request.go | |
parent | 648aac1b800fe506fe41f9143c2a4a2d95be408d (diff) |
fix REQUEST_URI for requests through FastCGI
Diffstat (limited to 'service/http/request.go')
-rw-r--r-- | service/http/request.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/service/http/request.go b/service/http/request.go index 5d91bfb6..630e26f6 100644 --- a/service/http/request.go +++ b/service/http/request.go @@ -170,6 +170,9 @@ func (r *Request) contentType() int { // uri fetches full uri from request in a form of string (including https scheme if TLS connection is enabled). func uri(r *http.Request) string { + if r.URL.Host != "" { + return r.URL.String() + } if r.TLS != nil { return fmt.Sprintf("https://%s%s", r.Host, r.URL.String()) } |