Repository navigation
Conversation
…server 'web' for native Mojo API routes The CGI environment is only emulated for the legacy .cgi routes, so on native Bugzilla::API::V1 routes log_user_request logged an empty URL and user agent, a default GET method and server 'web'. Read them from the Mojo request under USAGE_MODE_MOJO_REST instead.
Collaborator
|
Please fix: |
Collaborator
Author
|
Fixed both in two commits:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes
Bugzilla->log_user_requestread the request from the Mojo controller on nativeBugzilla::API::V1routes. It read it fromBugzilla->cgi, whose environment is only emulated for the legacy.cgiroutes (Bugzilla/App/Controller/CGI.pm), souser_request_logrows from native routes got an emptyrequest_urlanduser_agent, a defaultGETmethod and serverweb.Follow-up of 2081856, whose
GET /rest/bug/<id>/attachmentis the first native route that logs. Needed before 2081860, which movesbug-getlogging to the native routes.Changes
USAGE_MODE_MOJO_REST, take the URL path, method and user agent from the Mojo request, and log serverrest. The legacy routes are unchanged.REQUEST_URI, the logged URL is the path without the query string.t/app-log-user-request.t: logs from a test route and checks the whole row.Test plan
log_user_requests, thenGET /rest/bug/<id>/attachmentwith an API key: the newuser_request_logrow has the request path,GET, the client's user agent and serverrestattachment.cgi: the row still has serverwebReferences