1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[spidermonkey] fix for absolute urls in xhr

This commit is contained in:
Witold Filipczyk 2024-11-01 13:02:22 +01:00
parent dad22d436a
commit fcb4268085

View File

@ -619,6 +619,18 @@ xhr_open(JSContext *ctx, unsigned int argc, JS::Value *rval)
}
char *url = straconcat(ref, "/", xhr->responseURL, NULL);
if (url) {
xhr->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, xhr->responseURL, NULL);
if (url) {
xhr->uri = get_uri(url, URI_NONE);
mem_free(url);