This is an automated email from the ASF dual-hosted git repository.

dgelinas pushed a commit to branch 3.0.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/3.0.x by this push:
     new 94d0649  Return a JSON response with a 200 for successful PUT snapshot 
(#3407)
94d0649 is described below

commit 94d06494178ebc5693708ac0335266415c1de0b6
Author: Rawlin Peters <[email protected]>
AuthorDate: Fri Mar 15 13:36:50 2019 -0600

    Return a JSON response with a 200 for successful PUT snapshot (#3407)
    
    This fixes the deviation from the Perl implementation which returned a
    JSON response, fixing any clients that are currently broken due to
    expecting a JSON response from this endpoint (e.g. the Python TO
    client).
    
    Fixes #3276.
    
    (cherry picked from commit 25d754656d23ca505fb25c6c39190c3f25de7673)
---
 traffic_ops/traffic_ops_golang/crconfig/handler.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/traffic_ops/traffic_ops_golang/crconfig/handler.go 
b/traffic_ops/traffic_ops_golang/crconfig/handler.go
index ec980d9..afe4f68 100644
--- a/traffic_ops/traffic_ops_golang/crconfig/handler.go
+++ b/traffic_ops/traffic_ops_golang/crconfig/handler.go
@@ -134,7 +134,7 @@ func SnapshotHandler(w http.ResponseWriter, r 
*http.Request) {
                return
        }
        api.CreateChangeLogRawTx(api.ApiChange, "Snapshot of CRConfig performed 
for "+cdn, inf.User, inf.Tx.Tx)
-       w.WriteHeader(http.StatusOK) // TODO change to 204 No Content in new 
version
+       api.WriteResp(w, r, "SUCCESS")
 }
 
 // SnapshotGUIHandler creates the CRConfig JSON and writes it to the snapshot 
table in the database. The response emulates the old Perl UI function. This 
should go away when the old Perl UI ceases to exist.

Reply via email to