Skip to content

Commit

Permalink
fix invalid req shape; fix hostname check fn option
Browse files Browse the repository at this point in the history
  • Loading branch information
rawhat committed Jul 16, 2024
1 parent 3b98b6e commit 494c08e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/stratus.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ fn make_upgrade(req: Request(String), origin: String) -> BytesBuilder {
key <> ": " <> value
})
|> string.join("\r\n")
|> string.append("\r\n")

let path = case req.path {
"" -> "/"
Expand Down
5 changes: 5 additions & 0 deletions src/stratus/internal/socket.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ pub type Options {
Reuseaddr(Bool)
Nodelay(Bool)
Cacerts(Dynamic)
CustomizeHostnameCheck(Dynamic)
}

pub const default_options = [
Expand Down Expand Up @@ -70,6 +71,10 @@ pub fn convert_options(options: List(Options)) -> List(TcpOption) {
atom.create_from_string("send_timeout_close"),
dynamic.from(bool),
)
CustomizeHostnameCheck(funcs) -> #(
atom.create_from_string("customize_hostname_check"),
funcs,
)
}
})
}
Expand Down

0 comments on commit 494c08e

Please sign in to comment.