From 0113671f381365d7c50573efab8a60eab1eca6ad Mon Sep 17 00:00:00 2001
From: Jonathan Hanks <jonathan.hanks@ligo.org>
Date: Tue, 10 Nov 2020 12:01:57 -0800
Subject: [PATCH] Updating cps_recv's admin view in response to crc errors
 being triggered by channel listing.

Converted the channel list interface from get to post and added a warning.
---
 src/pub_sub_stream/cps_recv_admin.cc | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/pub_sub_stream/cps_recv_admin.cc b/src/pub_sub_stream/cps_recv_admin.cc
index 1bb89d95f..403dff4f3 100644
--- a/src/pub_sub_stream/cps_recv_admin.cc
+++ b/src/pub_sub_stream/cps_recv_admin.cc
@@ -209,8 +209,12 @@ namespace cps_admin
                           "type=\"submit\" value=\"Clear CRC "
                           "Counters\"/></form>\n";
                     os << "<h3>Channel List<h3>\n";
-                    os << "<p>View the <a href=\"/channels/\">channel list as "
-                          "json</a> (may bog down the browser).</p>\n";
+                    os << "<p>Warning, requesting the channel list may bog "
+                          "down your browser and has been seen to introduce "
+                          "CRC errors</p>\n";
+                    os << "<form method=\"POST\" action=\"/channels/\"><input "
+                          "type=\"submit\" value=\"Request List (JSON)\" "
+                          "/></form>\n";
                 }
                 else
                 {
@@ -276,9 +280,9 @@ namespace cps_admin
             response_type
             handle_channel_view( )
             {
-                if ( req_.method( ) != http::verb::get )
+                if ( req_.method( ) != http::verb::post )
                 {
-                    return bad_req_type( "Only GET supported" );
+                    return bad_req_type( "Only POST supported" );
                 }
 
                 std::ostringstream                             os;
-- 
GitLab