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.
2 parents 5b08188 + 97c92d7 commit bc29fceCopy full SHA for bc29fce
src/url.zig
@@ -81,10 +81,12 @@ pub const URL = struct {
81
/// For URLs without a path, it will add src as the path.
82
pub fn stitch(
83
allocator: Allocator,
84
- path: []const u8,
+ raw_path: []const u8,
85
base: []const u8,
86
comptime opts: StitchOpts,
87
) !StitchReturn(opts) {
88
+ const path = std.mem.trim(u8, raw_path, &.{ '\n', '\r' });
89
+
90
if (base.len == 0 or isCompleteHTTPUrl(path)) {
91
return simpleStitch(allocator, path, opts);
92
}
0 commit comments