Skip to content

Commit 7cf11f3

Browse files
committed
fix: newlines
1 parent 4a62c8e commit 7cf11f3

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

templates/ruby/lib/container/client.rb.twig

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ module {{ spec.title | caseUcfirst }}
213213
when 'application/json'
214214
payload = params.to_json
215215
when 'multipart/form-data'
216-
payload = encode_form_data(params) + "\r\n--#{@boundary}--"
216+
payload = encode_form_data(params) + "--#{@boundary}--\r\n"
217217
headers[:'content-type'] = "multipart/form-data; boundary=#{@boundary}"
218218
else
219219
payload = encode(params)
@@ -284,17 +284,18 @@ module {{ spec.title | caseUcfirst }}
284284
else
285285
post_body = []
286286
if value.instance_of? InputFile
287-
post_body << "--#{@boundary}\r\n"
288-
post_body << "Content-Disposition: form-data; name=\"#{key}\"; filename=\"#{value.filename}\"\r\n"
289-
post_body << "Content-Type: #{value.mime_type}\r\n\r\n"
287+
post_body << "--#{@boundary}"
288+
post_body << "Content-Disposition: form-data; name=\"#{key}\"; filename=\"#{value.filename}\""
289+
post_body << "Content-Type: #{value.mime_type}"
290+
post_body << ""
290291
post_body << value.data
291-
292292
else
293-
post_body << "--#{@boundary}\r\n"
294-
post_body << "Content-Disposition: form-data; name=\"#{key}\"\r\n\r\n"
295-
post_body << "#{value.to_s}"
293+
post_body << "--#{@boundary}"
294+
post_body << "Content-Disposition: form-data; name=\"#{key}\""
295+
post_body << ""
296+
post_body << value.to_s
296297
end
297-
post_body.join
298+
post_body.join("\r\n") + "\r\n"
298299
end
299300
end
300301

0 commit comments

Comments
 (0)