intersystems / intersystems/git-source-control
Fix behavior on nginx
- Lingua principale
- ObjectScript
- Stelle
- 22
- Fork
- 14
- Merge medio
- 1g 9h
- PR unite (30g)
- 5
Descrizione
From separate internal investigation (internal ref: DP-437290):
The Git Source Control module uses a CGI variable of REQUEST_URI during URL parsing / construction.
Relevant code in webuidriver.csp:
`Set url = $Piece($Get(%request.CgiEnvs("REQUEST_URI"),$Get(%request.CgiEnvs("HTTP_URL"))),"?")`
However, traffic from the Nginx web gateway does not come with this variable and causes "Set url" to an empty string and the malformed URL mentioned in the customer's description. (i.e. this variable is good with Apache, not Nginx).
For a workaround for Nginx users, adding this line of code right after the above one fixes the issue.
`Set:(url="") url = %request.URL _ %request.CgiEnvs("PATH_INFO")`
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start in webuidriver.csp at the REQUEST_URI-based URL assignment. Compare the URL values available through %request.URL and PATH_INFO when the gateway is Nginx, then verify the behavior with an Nginx request. Done means URL parsing no longer produces an empty or malformed URL for Nginx traffic.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- git, nginx
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 50/100