Closed Bug 650199 Opened 13 years ago Closed 13 years ago

Allow cross-domain XHR requests on the self-serve API for pages that do 302 redirects in response

Categories

(Release Engineering :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: heycam, Unassigned)

References

Details

+++ This bug was initially created as a clone of Bug #649922 +++

With bug 649922 resolved, simple cross-origin GETs to the self-serve build API work.

However, after doing a POST to request a rebuild (to https://build.mozilla.org/buildapi/self-serve/try/build), the server responds with a 302 redirecting to the job information page (http://build.mozilla.org/buildapi/self-serve/jobs/nnnn).  The redirection page also needs to have the CORS headers set, per bug 649922, but currently it doesn't.

This might also be the case with other resources that you can PUT, POST and DELETE to, but I haven't checked.
Just checked that POSTing (in lieu of a DELETE) to do a build cancellation also sends a 302 in response with no CORS headers.
Summary: Allow cross-domain XHR requests on the self-serve API → Allow cross-domain XHR requests on the self-serve API for pages that do 302 redirects in response
I was setting format=json in the POST request body, but this was giving me HTML result pages (including the redirect in between).  Now that I'm correctly sending `Accept: application/json`, there is no redirect, so the lack of CORS headers on the redirect page is not impacting me any more.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.