mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-31 09:29:42 +00:00
populate Response.statusText for network responses
Fetch responses from the network now have their statusText set using the HTTP status phrase (e.g. "OK", "Not Found"), matching the Fetch spec and the existing XMLHttpRequest behavior.
This commit is contained in:
@@ -117,6 +117,7 @@ fn httpHeaderDoneCallback(transfer: *Http.Transfer) !bool {
|
||||
}
|
||||
|
||||
res._status = header.status;
|
||||
res._status_text = std.http.Status.phrase(@enumFromInt(header.status)) orelse "";
|
||||
res._url = try arena.dupeZ(u8, std.mem.span(header.url));
|
||||
res._is_redirected = header.redirect_count > 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user