Skip to content

Commit

Permalink
rsc: Refine curl escape
Browse files Browse the repository at this point in the history
  • Loading branch information
V-FEXrt committed Aug 1, 2024
1 parent ba2afd5 commit eb037c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions share/wake/lib/system/http.wake
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ def makeCurlCmd ((HttpRequest url method headers body formData): HttpRequest) (e
def headerToCurlFlag (HttpHeader name value) = "--header", "{name}:{value}", Nil

def formDataToCurlFlag (HttpFormData name file contentType) = match contentType
Some ct -> "--form", "'{name}=@\"{file}\";type={ct}'", Nil
None -> "--form", "'{name}=@\"{file}\"'", Nil
Some ct -> "--form", "{name}=@\"{file}\";type={ct}", Nil
None -> "--form", "{name}=@\"{file}\"", Nil

def bodyToCurlFlag body =
require True = body.strlen >= 5000
Expand Down

0 comments on commit eb037c1

Please sign in to comment.