remove old atom check
This commit is contained in:
parent
f201fe1237
commit
3e0a1ea8fd
2 changed files with 3 additions and 4 deletions
|
|
@ -259,8 +259,7 @@ defmodule HTTPSignatures do
|
|||
defp check_required(used_headers, header_defs, has_body) do
|
||||
with true <- !has_body || uses_header?("digest", used_headers, header_defs),
|
||||
true <-
|
||||
uses_header?("host", used_headers, header_defs) ||
|
||||
uses_header?(:host, used_headers, header_defs),
|
||||
uses_header?("host", used_headers, header_defs),
|
||||
true <- @request_target in used_headers,
|
||||
true <-
|
||||
uses_header?("date", used_headers, header_defs) ||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ defmodule HttpSignaturesTest do
|
|||
%HTTPKey{key: @private_key},
|
||||
"http://mastodon.example.org/users/admin#main-key",
|
||||
%{
|
||||
:host => "mastodon.example.org",
|
||||
"host" => "mastodon.example.org",
|
||||
"(request-target)" => "post http://example.com/inbox",
|
||||
"(created)" => "#{DateTime.utc_now() |> DateTime.to_unix()}",
|
||||
"digest" =>
|
||||
|
|
@ -353,7 +353,7 @@ defmodule HttpSignaturesTest do
|
|||
%{
|
||||
"(request-target)" => request_target,
|
||||
"(created)" => DateTime.utc_now() |> DateTime.to_unix(),
|
||||
:host => conn_headers["host"],
|
||||
"host" => conn_headers["host"],
|
||||
"digest" => conn_headers["digest"]
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue