Applications/Internet/Cyberia: Fully resolve URLs in redirect
This commit is contained in:
parent
e3c7350a96
commit
7878e28027
1 changed files with 8 additions and 1 deletions
|
@ -184,7 +184,14 @@ U0 @cyberia_navigate()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resp->status.code == 301 || resp->status.code == 302) {
|
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;
|
@cyberia_navigate;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue