refactor: cleanup context (#1816)

* Removes NewRequestWithContext.

* Moves cgi logic to cgi.go

* Calls 'update_request_info' from the C side.

* Calls 'update_request_info' from the C side.

* clang-format

* Removes unnecessary export.

* Adds TODO.

* Adds TODO.

* Removes 'is_worker_thread'

* Shortens return statement.

* Removes the context refactor.

* adjusts comment.

* Skips parsing cgi path variables on explicitly assigned worker.

* suggesions by @dunglas.

* Re-introduces 'is_worker_thread'.

* More formatting.
This commit is contained in:
Alexander Stecher
2025-08-25 16:18:20 +02:00
committed by GitHub
parent 4dd6b5ea16
commit c10e85b905
7 changed files with 115 additions and 165 deletions

View File

@@ -75,14 +75,6 @@ func (handler *regularThread) waitForRequest() string {
handler.requestContext = fc
handler.state.markAsWaiting(false)
if err := updateServerContext(handler.thread, fc, false); err != nil {
fc.rejectBadRequest(err.Error())
handler.afterRequest()
handler.thread.Unpin()
// go back to beforeScriptExecution
return handler.beforeScriptExecution()
}
// set the scriptFilename that should be executed
return fc.scriptFilename
}