mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
Fix to use '/' for a empty path (#14884)
Signed-off-by: Kotaro Inoue <k.musaino@gmail.com>
This commit is contained in:
parent
1e6d7f7763
commit
9ecdcb8e30
@ -333,7 +333,11 @@ pub fn request(client: *Client, uri: Uri, headers: Request.Headers, options: Req
|
||||
|
||||
try writer.writeAll(@tagName(headers.method));
|
||||
try writer.writeByte(' ');
|
||||
try writer.writeAll(escaped_path);
|
||||
if (escaped_path.len == 0) {
|
||||
try writer.writeByte('/');
|
||||
} else {
|
||||
try writer.writeAll(escaped_path);
|
||||
}
|
||||
if (escaped_query) |q| {
|
||||
try writer.writeByte('?');
|
||||
try writer.writeAll(q);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user