From e96dbf984d7574c07232a480d61832c216eca348 Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Wed, 14 Nov 2018 14:16:03 -0500 Subject: Read STDIN to upload it http.rb can't stream from pipes. --- lib/tasks/ingress.rake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/tasks/ingress.rake b/lib/tasks/ingress.rake index e86f95e859..96bd9b184a 100644 --- a/lib/tasks/ingress.rake +++ b/lib/tasks/ingress.rake @@ -17,7 +17,8 @@ namespace :action_mailbox do begin response = HTTP.basic_auth(user: "actionmailbox", pass: password) .timeout(connect: 1, write: 10, read: 10) - .post(url, headers: { "Content-Type" => "message/rfc822", "User-Agent" => ENV.fetch("USER_AGENT", "Postfix") }, body: STDIN) + .post(url, body: STDIN.read, + headers: { "Content-Type" => "message/rfc822", "User-Agent" => ENV.fetch("USER_AGENT", "Postfix") }) case when response.status.success? -- cgit v1.2.3