Append special parameters when needed to Location headers in the API.

Review Request #1974 — Created Dec. 4, 2010 and submitted — Latest diff uploaded

Information

Djblets
master

Reviewers

Append special parameters when needed to Location headers in the API.

The special parameters ("callback", "_method" and "api_format") weren't
being provided on any Location headers, and for HTTP implementations that
don't allow you to know about redirects (such as AJAX on modern web browsers),
you have no way of knowing these were even dropped and ignored by
subsequent requests.

Worse, web browsers don't preserve the HTTP Accept header
on redirects, meaning that a JSON request can turn into an XML response with
a redirect.

Now, these special parameters are appended to any returned Location headers,
working around these issues.
Seems to solve my problem with the Review Board web UI work.