skiaserve: Set 303 status code on redirect.
authorjcgregorio <jcgregorio@google.com>
Wed, 27 Jan 2016 19:44:38 +0000 (11:44 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 27 Jan 2016 19:44:38 +0000 (11:44 -0800)
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

tools/skiaserve/skiaserve.cpp

index fa98d79..20f5b44 100644 (file)
@@ -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;
 }