Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
elixir: "1.18"
# Oldest version. We technically support OTP 23 but hard to test in CI
- erlang: "24.3"
elixir: "1.14"
elixir: "1.15"

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 0 additions & 1 deletion lib/mint/core/transport/ssl.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
defmodule Mint.Core.Transport.SSL do
@moduledoc false

require Logger
require Record

@behaviour Mint.Core.Transport
Expand Down
4 changes: 2 additions & 2 deletions lib/mint/http1.ex
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ defmodule Mint.HTTP1 do
{:ok, conn, responses}

length <= byte_size(data) ->
<<body::binary-size(length), rest::binary>> = data
<<body::binary-size(^length), rest::binary>> = data
{conn, responses} = add_body(conn, body, responses)
conn = request_done(conn)
responses = [{:done, request_ref} | responses]
Expand Down Expand Up @@ -836,7 +836,7 @@ defmodule Mint.HTTP1 do
{:ok, conn, responses}

length <= byte_size(data) ->
<<body::binary-size(length), rest::binary>> = data
<<body::binary-size(^length), rest::binary>> = data
{conn, responses} = add_body(conn, body, responses)
conn = put_in(conn.request.body, {:chunked, :crlf})
decode_body({:chunked, :crlf}, conn, rest, request_ref, responses)
Expand Down
2 changes: 1 addition & 1 deletion lib/mint/http2.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@ defmodule Mint.HTTP2 do
end

defp split_payload_in_chunks(binary, chunk_size, acc) do
<<chunk::size(chunk_size)-binary, rest::binary>> = binary
<<chunk::size(^chunk_size)-binary, rest::binary>> = binary
split_payload_in_chunks(rest, chunk_size, [chunk | acc])
end

Expand Down
2 changes: 1 addition & 1 deletion lib/mint/http2/frame.ex
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ defmodule Mint.HTTP2.Frame do
else
# 1 byte is for the space taken by pad_length
data_length = byte_size(payload) - pad_length - 1
<<data::size(data_length)-binary, padding::size(pad_length)-binary>> = rest
<<data::size(^data_length)-binary, padding::size(^pad_length)-binary>> = rest
{data, padding}
end
end
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ defmodule Mint.MixProject do
[
app: :mint,
version: @version,
elixir: "~> 1.14",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
Expand Down
2 changes: 1 addition & 1 deletion test/mint/http1/conn_properties_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ defmodule Mint.HTTP1.PropertiesTest do
|> Enum.sort()
|> Enum.reduce({[], binary, 0}, fn split, {chunks, rest, prev_split} ->
length = split - prev_split
<<chunk::binary-size(length), rest::binary>> = rest
<<chunk::binary-size(^length), rest::binary>> = rest
{[chunk | chunks], rest, split}
end)
|> join_last_chunk()
Expand Down
6 changes: 2 additions & 4 deletions test/mint/http2/integration_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ defmodule HTTP2.IntegrationTest do

assert {:ok, %HTTP2{} = conn, ref} = HTTP2.request(conn, "GET", "/httpbin/", [], nil)

# For some reason, on OTP 26+ we get an SSL message sneaking in here. Instead of going
# For some reason, we get an SSL message sneaking in here. Instead of going
# crazy trying to debug it, for now let's just swallow it.
if System.otp_release() >= "26" do
assert_receive {:ssl, _socket, _data}, 1000
end
assert_receive {:ssl, _socket, _data}, 1000

assert {:ok, %HTTP2{} = conn, responses} = receive_stream(conn)

Expand Down
2 changes: 0 additions & 2 deletions test/mint/unix_socket_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ defmodule Mint.UnixSocketTest do

alias Mint.{HTTP, TestSocketServer}

require HTTP

unix? = match?({:unix, _}, :os.type())
otp_19? = System.otp_release() >= "19"
@moduletag skip: not (unix? and otp_19?)
Expand Down