diff options
author | 2016-01-27 11:44:38 -0800 | |
---|---|---|
committer | 2016-01-27 11:44:38 -0800 | |
commit | 6f17bc5895e1099d3a8a10c0497b66ea91985367 (patch) | |
tree | d0c5b4fd9dfc0bffc0a372590da58b2e684b9260 | |
parent | 2b6aa21817ce600d280fe29cc088cc86ebd5d514 (diff) |
skiaserve: Set 303 status code on redirect.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1641823002
Review URL: https://codereview.chromium.org/1641823002
-rw-r--r-- | tools/skiaserve/skiaserve.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/skiaserve/skiaserve.cpp b/tools/skiaserve/skiaserve.cpp index fa98d79287..20f5b446c6 100644 --- a/tools/skiaserve/skiaserve.cpp +++ b/tools/skiaserve/skiaserve.cpp @@ -163,12 +163,14 @@ static int SendTemplate(MHD_Connection* connection, bool redirect = false, (void*) const_cast<char*>(debuggerTemplate.c_str()), MHD_RESPMEM_MUST_COPY); + int status = MHD_HTTP_OK; + if (redirect) { MHD_add_response_header (response, "Location", redirectUrl); + status = MHD_HTTP_SEE_OTHER; } - - int ret = MHD_queue_response(connection, MHD_HTTP_OK, response); + int ret = MHD_queue_response(connection, status, response); MHD_destroy_response(response); return ret; } |