[fractal] Only set Content-Length header on POSTs



commit 1224e8e86f5a6b3277b23143c5848863a8a0db7e
Author: Scott Sweeny <scott ssweeny net>
Date:   Sun Apr 28 21:24:55 2019 -0400

    Only set Content-Length header on POSTs

 fractal-matrix-api/src/util.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/fractal-matrix-api/src/util.rs b/fractal-matrix-api/src/util.rs
index 09985f07..08adb339 100644
--- a/fractal-matrix-api/src/util.rs
+++ b/fractal-matrix-api/src/util.rs
@@ -358,7 +358,7 @@ pub fn json_q(method: &str, url: &Url, attrs: &JsonValue) -> Result<JsonValue, E
 
     if !attrs.is_null() {
         conn = conn.json(attrs);
-    } else {
+    } else if method == "post" {
         conn = conn.header(CONTENT_LENGTH, 0);
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]