Closed Bug 1495906 Opened 6 years ago Closed 6 years ago

After mojo update /latest/configuration API call no longer works and gives page not found

Categories

(bugzilla.mozilla.org :: API, enhancement)

Staging
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dkl, Assigned: dkl)

References

Details

Attachments

(1 file)

In the old Apache world of htaccess, /latest/configuration would rewwrite to /bzapi/configuration

RewriteRule ^(?:latest|1\.2|1\.3)/(.*)$ extensions/BzAPI/bin/rest.cgi/$1 [NE]
RewriteRule ^bzapi/(.*)$ extensions/BzAPI/bin/rest.cgi/$1 [NE]

With the mojo update that /latest prefix no longer works.

$r->any('/extensions/BzAPI/bin/rest.cgi/*PATH_INFO')->to('CGI#bzapi_cgi');
$r->any('/bzapi/*PATH_INFO')->to('CGI#bzapi_cgi');

Need to add:

$r->any('/latest/*PATH_INFO')->to('CGI#bzapi_cgi');

and this should work again.
How annoying. It turned out I checked for /1.2/ and /1.3/ but not /latest/
(Nobody uses /1.2/ or /1.3/)

I think this helps my argument for all routes being in the same file though.
Attached file GitHub Pull Request
Merged to master.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Depends on: bmo-mojo
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: