mirror of
https://git.checksum.fail/alec/erythros
synced 2025-12-11 21:49:53 +02:00
Applications/Internet/Cyberia: Fully resolve URLs in redirect
This commit is contained in:
@@ -184,7 +184,14 @@ U0 @cyberia_navigate()
|
||||
}
|
||||
|
||||
if (resp->status.code == 301 || resp->status.code == 302) {
|
||||
StrCpy(&addressbar1->text, resp->headers->@("Location"));
|
||||
U8* unresolved_location = resp->headers->@("Location");
|
||||
if (!unresolved_location)
|
||||
return;
|
||||
U8* resolved_location = @resolve_href(browser->renderer, unresolved_location);
|
||||
if (!resolved_location)
|
||||
return;
|
||||
StrCpy(&addressbar1->text, resolved_location);
|
||||
Free(resolved_location);
|
||||
@cyberia_navigate;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user