aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar jcgregorio <jcgregorio@google.com>2016-01-27 11:44:38 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-01-27 11:44:38 -0800
commit6f17bc5895e1099d3a8a10c0497b66ea91985367 (patch)
treed0c5b4fd9dfc0bffc0a372590da58b2e684b9260 /tools
parent2b6aa21817ce600d280fe29cc088cc86ebd5d514 (diff)
skiaserve: Set 303 status code on redirect.
Diffstat (limited to 'tools')
-rw-r--r--tools/skiaserve/skiaserve.cpp6
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;
}