mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
ss: static policy generator: fix filepath detection
This commit is contained in:
parent
61c2e3291f
commit
9b56baca8f
2 changed files with 4 additions and 1 deletions
|
@ -1246,10 +1246,11 @@ lws_ss_policy_parse(struct lws_context *context, const uint8_t *buf, size_t len)
|
|||
int m;
|
||||
|
||||
#if !defined(LWS_PLAT_FREERTOS) && !defined(LWS_PLAT_OPTEE)
|
||||
if (args->jctx.line < 2 && buf[0] != '{')
|
||||
if (args->jctx.line < 2 && buf[0] != '{' && !args->parse_data)
|
||||
return lws_ss_policy_parse_file(context, (const char *)buf);
|
||||
#endif
|
||||
|
||||
args->parse_data = 1;
|
||||
m = lejp_parse(&args->jctx, buf, (int)len);
|
||||
if (m == LEJP_CONTINUE || m >= 0)
|
||||
return m;
|
||||
|
|
|
@ -401,6 +401,8 @@ struct policy_cb_args {
|
|||
|
||||
int count;
|
||||
char pending_respmap;
|
||||
|
||||
uint8_t parse_data:1;
|
||||
};
|
||||
|
||||
#if defined(LWS_WITH_SYS_SMD)
|
||||
|
|
Loading…
Add table
Reference in a new issue