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:
parent
dad22d436a
commit
fcb4268085
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user