mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[mujs] fix in xhr
This commit is contained in:
parent
e2d0fe1d5a
commit
b4cbd9982f
@ -231,7 +231,6 @@ process_xhr_headers(char *head, struct mjs_xhr *x)
|
||||
next = next2 + 1;
|
||||
next2 = strchr(next, '\n');
|
||||
}
|
||||
next = next2 + 1;
|
||||
size = explode(line, ':', &header, &value);
|
||||
|
||||
if (size == 0) {
|
||||
|
@ -427,6 +427,18 @@ mjs_xhr_open(js_State *J)
|
||||
}
|
||||
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);
|
||||
@ -434,6 +446,7 @@ mjs_xhr_open(js_State *J)
|
||||
mem_free(ref);
|
||||
}
|
||||
}
|
||||
|
||||
if (!xhr->uri) {
|
||||
xhr->uri = get_uri(xhr->responseURL, URI_NONE);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user