Skip to content

Commit

Permalink
v1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lpil committed Dec 28, 2024
1 parent 07c62e7 commit 1738ab1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v1.5.0 - 2024-12-28

- `handle_head` no longer sets the body to `Empty`. This is so the webserver can
get the content-length of the body that would have been set, which may be
useful to clients.

## v1.4.0 - 2024-12-19

- Updated for `mist` v5.0.0.
Expand Down
2 changes: 1 addition & 1 deletion gleam.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "wisp"
version = "1.4.0"
version = "1.5.0"
gleam = ">= 1.4.0"
description = "A practical web framework for Gleam"
licences = ["Apache-2.0"]
Expand Down
1 change: 0 additions & 1 deletion src/wisp.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -1528,7 +1528,6 @@ pub fn handle_head(
|> request.set_method(http.Get)
|> request.prepend_header("x-original-method", "HEAD")
|> handler
|> response.set_body(Empty)
_ -> handler(req)
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/wisp_test.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ pub fn handle_head_test() {
|> should.equal(Response(
201,
[#("content-type", "text/html; charset=utf-8")],
wisp.Empty,
wisp.Text(string_tree.from_string("Hello!")),
))

testing.get("/", [])
Expand Down

0 comments on commit 1738ab1

Please sign in to comment.