Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Unified Diff: tools/skiaserve/skiaserve.cpp

Issue 1641823002: skiaserve: Set 303 status code on redirect. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skiaserve/skiaserve.cpp
diff --git a/tools/skiaserve/skiaserve.cpp b/tools/skiaserve/skiaserve.cpp
index fa98d792876f9290a3b5b0b69d85725e45af2e32..20f5b446c6f715cdd37a9a1abef6a7460050c228 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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698