1
0
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:
Witold Filipczyk 2024-06-24 20:36:09 +02:00
parent 9a68ae3596
commit 8d778449a6
3 changed files with 3 additions and 3 deletions

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {