Skip to content

Commit

Permalink
Merge pull request #440 from tomekzaw/fix-digest-auth-http-method
Browse files Browse the repository at this point in the history
Use original HTTP method to retrieve digest authorization variables
  • Loading branch information
teamon authored Mar 24, 2021
2 parents 4aa32ae + 62e6a86 commit daaccbc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/tesla/middleware/digest_auth.ex
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ defmodule Tesla.Middleware.DigestAuth do

defp authorization_vars(env, opts) do
with {:ok, unauthorized_response} <-
env.__module__.get(
env.__module__.request(
env.__client__,
env.url,
method: env.opts[:pre_auth_method] || env.method,
url: env.url,
opts: Keyword.put(env.opts || [], :digest_auth_handshake, true)
) do
{:ok,
Expand Down

0 comments on commit daaccbc

Please sign in to comment.