File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -368,9 +368,6 @@ pub const Page = struct {
368368
369369 // update uri after eventual redirection
370370 var buf : std .ArrayListUnmanaged (u8 ) = .{};
371- defer buf .deinit (arena );
372-
373- buf .clearRetainingCapacity ();
374371 try request .uri .writeToStream (.{
375372 .scheme = true ,
376373 .authentication = true ,
@@ -379,7 +376,7 @@ pub const Page = struct {
379376 .query = true ,
380377 .fragment = true ,
381378 }, buf .writer (arena ));
382- self .rawuri = try buf .toOwnedSlice ( arena ) ;
379+ self .rawuri = buf .items ;
383380
384381 self .uri = try std .Uri .parse (self .rawuri .? );
385382
@@ -389,12 +386,12 @@ pub const Page = struct {
389386 try self .session .window .replaceLocation (& self .location );
390387
391388 // prepare origin value.
392- buf . clearRetainingCapacity () ;
389+ buf = .{} ;
393390 try request .uri .writeToStream (.{
394391 .scheme = true ,
395392 .authority = true ,
396393 }, buf .writer (arena ));
397- self .origin = try buf .toOwnedSlice ( arena ) ;
394+ self .origin = buf .items ;
398395
399396 log .info ("GET {any} {d}" , .{ self .uri , header .status });
400397
You can’t perform that action at this time.
0 commit comments