mirror of
https://github.com/Ylianst/MeshAgent
synced 2026-01-09 03:53:26 +00:00
1. Fixed bug with Authenticode URI parsing
2. Fixed bug with Http Uri parsing
This commit is contained in:
@@ -3913,7 +3913,7 @@ duk_ret_t ILibDuktape_httpStream_parseUri(duk_context *ctx)
|
||||
|
||||
char *path, *addr;
|
||||
unsigned short port;
|
||||
int protocolIndex;
|
||||
int protocolIndex, i;
|
||||
|
||||
char *username = NULL;
|
||||
char *password = NULL;
|
||||
@@ -3980,6 +3980,16 @@ duk_ret_t ILibDuktape_httpStream_parseUri(duk_context *ctx)
|
||||
duk_push_null(ctx);
|
||||
}
|
||||
password = NULL;
|
||||
// [options]
|
||||
uri = Duktape_GetStringPropertyValueEx(ctx, -1, "host", NULL, &uriLen);
|
||||
if ((i = ILibString_IndexOf(uri, uriLen, "?", 1)) >= 0)
|
||||
{
|
||||
duk_push_sprintf(ctx, "/%s", uri + i); // [options][newpath]
|
||||
duk_put_prop_string(ctx, -2, "path"); // [options]
|
||||
duk_push_lstring(ctx, uri, i); // [options][newhost]
|
||||
duk_put_prop_string(ctx, -2, "host"); // [options]
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user