projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9df5918
)
FollowRedirects: Unconditionally release the connection if there is an error
author
rinpatch
<rinpatch@sdf.org>
Tue, 30 Jun 2020 12:58:53 +0000
(15:58 +0300)
committer
rinpatch
<rinpatch@sdf.org>
Wed, 15 Jul 2020 12:26:35 +0000
(15:26 +0300)
There is no need for streaming the body if there is no body
lib/pleroma/tesla/middleware/follow_redirects.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/tesla/middleware/follow_redirects.ex
b/lib/pleroma/tesla/middleware/follow_redirects.ex
index f2c502c6971d8e7beb6d3a5e433337f2771c5b39..5a70322158156d97929f0480384a05342162e1f0 100644
(file)
--- a/
lib/pleroma/tesla/middleware/follow_redirects.ex
+++ b/
lib/pleroma/tesla/middleware/follow_redirects.ex
@@
-55,6
+55,10
@@
defmodule Pleroma.HTTP.Middleware.FollowRedirects do
release_conn(opts)
{:error, {__MODULE__, :too_many_redirects}}
+ {:error, _} = e ->
+ release_conn(opts)
+ e
+
other ->
unless opts[:body_as] == :chunks do
release_conn(opts)