Skip to content

Commit ae6fb95

Browse files
committed
cookie removal
1 parent 03d5048 commit ae6fb95

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- Support non-string values in markdown fields. `NULL` values are now displayed as empty strings, numeric values are displayed as strings, booleans as `true` or `false`, and arrays as lines of text. This avoids the need to cast values to strings in SQL queries.
1010
- Revert a change introduced in v0.15.0:
1111
- Re-add the systematic `CAST(? AS TEXT)` around variables, which helps the database know which type it is dealing with in advance. This fixes a regression in 0.15 where some SQLite websites were broken because of missing affinity information. In SQLite `SELECT '1' = 1` returns `false` but `SELECT CAST('1' AS TEXT) = 1` returns `true`.
12+
- Fix a bug where [cookie](https://sql.ophir.dev/documentation.sql?component=cookie#component) removal set the cookie value to the empty string instead of removing the cookie completely.
1213

1314
## 0.15.0 (2023-10-29)
1415
- New function: [`sqlpage.path`](https://sql.ophir.dev/functions.sql?function=path#function) to get the path of the current page.

src/render.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ impl<W: std::io::Write> HeaderContext<W> {
108108

109109
let remove = obj.get("remove");
110110
if remove == Some(&json!(true)) || remove == Some(&json!(1)) {
111+
cookie.make_removal();
111112
self.response.cookie(cookie);
112113
log::trace!("Removing cookie {}", name);
113114
return Ok(self);

0 commit comments

Comments
 (0)