We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d762688 commit ade2c65Copy full SHA for ade2c65
src/url/query.zig
@@ -161,6 +161,8 @@ pub fn parseQuery(alloc: std.mem.Allocator, s: []const u8) !Values {
161
var values = Values.init(alloc);
162
errdefer values.deinit();
163
164
+ const arena = values.arena.allocator();
165
+
166
const ln = s.len;
167
if (ln == 0) return values;
168
@@ -177,8 +179,8 @@ pub fn parseQuery(alloc: std.mem.Allocator, s: []const u8) !Values {
177
179
const v = rr.tail();
178
180
181
// decode k and v
- const kk = try unescape(alloc, k);
- const vv = try unescape(alloc, v);
182
+ const kk = try unescape(arena, k);
183
+ const vv = try unescape(arena, v);
184
185
try values.appendOwned(kk, vv);
186
0 commit comments