diff options
author | George Claghorn <george@basecamp.com> | 2018-11-14 14:16:03 -0500 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2018-11-14 14:16:03 -0500 |
commit | e96dbf984d7574c07232a480d61832c216eca348 (patch) | |
tree | c24204880efa1708b6c6e72bdcb7acb7f7c49f4a /lib/tasks | |
parent | dd43f6e7d90ab0d2c354a9bef1970e4f3a7e6471 (diff) | |
download | rails-e96dbf984d7574c07232a480d61832c216eca348.tar.gz rails-e96dbf984d7574c07232a480d61832c216eca348.tar.bz2 rails-e96dbf984d7574c07232a480d61832c216eca348.zip |
Read STDIN to upload it
http.rb can't stream from pipes.
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/ingress.rake | 3 |
1 files changed, 2 insertions, 1 deletions
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? |