mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[quickjs] Fix in xhr (absolute paths)
This commit is contained in:
parent
fcb4268085
commit
e2d0fe1d5a
@ -567,7 +567,6 @@ process_xhr_headers(char *head, struct Xhr *x)
|
||||
next = next2 + 1;
|
||||
next2 = strchr(next, '\n');
|
||||
}
|
||||
next = next2 + 1;
|
||||
size = explode(line, ':', &header, &value);
|
||||
|
||||
if (size == 0) {
|
||||
|
@ -1072,6 +1072,18 @@ xhr_open(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
|
||||
}
|
||||
char *url = straconcat(ref, "/", x->responseURL, NULL);
|
||||
|
||||
if (url) {
|
||||
x->uri = get_uri(url, URI_NONE);
|
||||
mem_free(url);
|
||||
}
|
||||
mem_free(ref);
|
||||
}
|
||||
} else {
|
||||
char *ref = get_uri_string(vs->uri, URI_SERVER);
|
||||
|
||||
if (ref) {
|
||||
char *url = straconcat(ref, x->responseURL, NULL);
|
||||
|
||||
if (url) {
|
||||
x->uri = get_uri(url, URI_NONE);
|
||||
mem_free(url);
|
||||
|
Loading…
x
Reference in New Issue
Block a user