Closed
Bug 1126315
Opened 11 years ago
Closed 11 years ago
Add rewrite rule to htaccess to properly map BzAPI requests to the BzAPI compatibility extension path
Categories
(bugzilla.mozilla.org :: API, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dkl, Assigned: dkl)
References
Details
Attachments
(1 file)
|
674 bytes,
patch
|
glob
:
review+
|
Details | Diff | Splinter Review |
This bug is to implement the idea proposed in bug 1105122 comment 19 to allow /latest/, /1.2/, or /1.3/ requests to be remapped to /bzapi/ so that the requests use the BzAPI extension.
Currently the api-dev redirect is using the following logic to do the mapping:
if(
string.startsWith( $path, "/latest/") ||
string.startsWith( $path, "/1.3/") ||
string.startsWith( $path, "/1.2/")
) {
$newpath = string.regexsub( $path, "^/(latest|1.2|1.3)/", "/bzapi/" );
http.setPath( $newpath );
http.changesite( "https://bugzilla.mozilla.org" );
} else {
connection.discard();
}
We can do similar on BMO directly in the htaccess file by adding the following line:
RewriteRule ^(latest|1\.2|1\.3)/(.*)$ bzapi/$1 [NE]
The api-dev can just be redirected to BMO without the need to check the path before (bug 1098342).
Patch coming up
dkl
| Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8555616 -
Flags: review?(glob)
Comment on attachment 8555616 [details] [diff] [review]
1126315_1.patch
Review of attachment 8555616 [details] [diff] [review]:
-----------------------------------------------------------------
r=glob
Attachment #8555616 -
Flags: review?(glob) → review+
| Assignee | ||
Comment 3•11 years ago
|
||
Thanks!
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
66ed543..a496214 master -> master
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•