chiark / gitweb /
Adjust LitLinesCrlf input string literals for consistent indentation
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 10 May 2026 10:13:28 +0000 (11:13 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 10 May 2026 11:05:44 +0000 (12:05 +0100)
This will let us avoid trim, and instead trim a controlled amount.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
client/client.rs

index 28d39bcedec582c8a40819596167cbde5f9033f6..04686ebd6d04c5ba5ea9b0f9f3786326c3bba924 100644 (file)
@@ -107,8 +107,8 @@ fn submit_request<'r, 'c:'r>(
 
   let req_num = { *req_num += 1; *req_num };
 
-  let prefix1 = lines_crlf!(&LitLinesCrlf(
-    r#"--b
+  let prefix1 = lines_crlf!(&LitLinesCrlf(r#"
+       --b
        Content-Type: text/plain; charset="utf-8"
        Content-Disposition: form-data; name="m"
        "#),
@@ -121,15 +121,15 @@ fn submit_request<'r, 'c:'r>(
                        c.ic.max_batch_up,
   );
 
-  let prefix2 = lines_crlf!(&LitLinesCrlf(
-    r#"
+  let prefix2 = lines_crlf!(&LitLinesCrlf(r#"
+
        --b
        Content-Type: application/octet-stream
        Content-Disposition: form-data; name="d"
        "#),
   );
-  let suffix = lines_crlf!(&LitLinesCrlf(
-    r#"
+  let suffix = lines_crlf!(&LitLinesCrlf(r#"
+
        --b--"#),
   );