Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move FCGI req.URL.Path fix-up to the FCGI listener #15292

Merged
merged 6 commits into from
Apr 9, 2021

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Apr 5, 2021

Simplify the web.go FCGI path by moving the req.URL.Path fix-up to listener. This makes FCGI work on SubURLs following the Chi migration.

Signed-off-by: Andrew Thornton [email protected]

Simplify the web.go FCGI path by moving the req.URL.Path fix-up to listener

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Apr 5, 2021
@zeripath zeripath added this to the 1.15.0 milestone Apr 5, 2021
@zeripath
Copy link
Contributor Author

zeripath commented Apr 5, 2021

extract from #15186

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 5, 2021
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 6, 2021
@zeripath zeripath added type/bug backport/v1.14 and removed type/refactoring Existing code has been cleaned up. There should be no new functionality. labels Apr 7, 2021
@zeripath
Copy link
Contributor Author

zeripath commented Apr 7, 2021

Actually having tested on master - I think this is actually necessary to fix a bug with FCGI.

zeripath added a commit to zeripath/gitea that referenced this pull request Apr 9, 2021
Backport go-gitea#15292

Simplify the web.go FCGI path by moving the req.URL.Path fix-up to listener

Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath added the backport/done All backports for this PR have been created label Apr 9, 2021
@zeripath zeripath mentioned this pull request Apr 9, 2021
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 9, 2021
@lunny lunny merged commit 9d2c251 into go-gitea:master Apr 9, 2021
@zeripath zeripath deleted the simplify-fcgi-requrl-path-fixing branch April 9, 2021 13:25
zeripath added a commit that referenced this pull request Apr 9, 2021
Backport #15292

Simplify the web.go FCGI path by moving the req.URL.Path fix-up to listener

Signed-off-by: Andrew Thornton <[email protected]>
zeripath added a commit that referenced this pull request May 4, 2021
…15301)

Since the move to Chi the number of stack frames has proliferated somewhat catastrophically and we're up to 96 frames with multiple tests of the url outside of a trie which is inefficient.

This PR reduces the number of stack frames by 6 through careful use of Route, moves Captcha into its own router so that it only fires on Captcha routes, similarly for avatars and repo-avatars.

The robots.txt, / and apple-touch-icon.png are moved out of requiring Contexter.

It moves access logger higher in the stack frame because there is no reason why it can't be higher.

Extract from #15186
Contains #15292
@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants