mirror of
https://github.com/rkd77/elinks.git
synced 2024-11-04 08:17:17 -05:00
[ecmascript] Compare the first character of url with slash
It did not load '_static/something.json'.
This commit is contained in:
parent
9a68ae3596
commit
8d778449a6
@ -416,7 +416,7 @@ mjs_xhr_open(js_State *J)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!strchr(xhr->responseURL, '/')) {
|
||||
if (xhr->responseURL[0] != '/') {
|
||||
char *ref = get_uri_string(vs->uri, URI_DIR_LOCATION | URI_PATH);
|
||||
|
||||
if (ref) {
|
||||
|
@ -1058,7 +1058,7 @@ xhr_open(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
|
||||
struct ecmascript_interpreter *interpreter = (struct ecmascript_interpreter *)JS_GetContextOpaque(ctx);
|
||||
struct view_state *vs = interpreter->vs;
|
||||
|
||||
if (!strchr(x->responseURL, '/')) {
|
||||
if (x->responseURL[0] != '/') {
|
||||
char *ref = get_uri_string(vs->uri, URI_DIR_LOCATION | URI_PATH);
|
||||
|
||||
if (ref) {
|
||||
|
@ -608,7 +608,7 @@ xhr_open(JSContext *ctx, unsigned int argc, JS::Value *rval)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!strchr(xhr->responseURL, '/')) {
|
||||
if (xhr->responseURL[0] != '/') {
|
||||
char *ref = get_uri_string(vs->uri, URI_DIR_LOCATION | URI_PATH);
|
||||
|
||||
if (ref) {
|
||||
|
Loading…
Reference in New Issue
Block a user