Closed
Description
- Gitea version (or commit ref): 1.13.1
- Git version: 2.26.2
- Operating system: Official Docker image; gitea/gitea:1.13.1
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Log gist:
[Macaron] 2021-01-12 10:00:58: Started GET for xxx.xxx.xxx.xxx
[Macaron] [Static] Serving /serviceworker.js
[Macaron] 2021-01-12 10:00:58: Completed GET 304 Not Modified in 479.996µs
[Macaron] 2021-01-12 10:00:58: Completed GET 304 Not Modified in 479.996µs
[Macaron] 2021-01-12 10:00:58: Started GET for xxx.xxx.xxx.xxx
[Macaron] 2021-01-12 10:00:58: Started GET for xxx.xxx.xxx.xxx
[Macaron] 2021-01-12 10:00:58: Completed GET 200 OK in 3.775066ms
[Macaron] 2021-01-12 10:00:58: Completed GET 200 OK in 3.775066ms
Description
When using PROTOCOL = fcgi
, request paths(http.Request.RequestURI
) are not shown in the logs.
Go's net/http/cgi.RequestFromMap()
, which net/http/fcgi
uses, does not populate RequestURI
(but does URL
). As RequestURI
is documented "Usually the URL field should be used instead", req.URL.RequestURI()
may be a simple and recommended alternative.
Line 89 in 9659808
Line 96 in 9659808
Screenshots
None