diff options
| author | fengweihao <[email protected]> | 2024-07-05 15:06:45 +0800 |
|---|---|---|
| committer | fengweihao <[email protected]> | 2024-07-05 15:06:45 +0800 |
| commit | d5b630c5a51242bda719fa3e65b7350924872a9a (patch) | |
| tree | 4ae92d80496e4f5fddd854a2896bbd0389d273fe /plugin/business/tsg-http/src/http_lua.cpp | |
| parent | adf585800bd4918f5106544ee907502426f8c31d (diff) | |
TSG-21649 修复client_administrative_area字段乱码问题以及Edit Element处理多json问题
Diffstat (limited to 'plugin/business/tsg-http/src/http_lua.cpp')
| -rw-r--r-- | plugin/business/tsg-http/src/http_lua.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugin/business/tsg-http/src/http_lua.cpp b/plugin/business/tsg-http/src/http_lua.cpp index 78b93ba..1832645 100644 --- a/plugin/business/tsg-http/src/http_lua.cpp +++ b/plugin/business/tsg-http/src/http_lua.cpp @@ -657,7 +657,15 @@ static int http_lua_rewrite_header(struct elua_vm *vm) return 0; } - tfe_http_nonstd_field_write(tsg_ctx->replacing, field_name, field_value); + enum tfe_http_std_field field_id=http_field_name_to_std_field(field_name, strlen(field_name)); + if(field_id == TFE_HTTP_UNKNOWN_FIELD) + { + tfe_http_nonstd_field_write(tsg_ctx->replacing, field_name, field_value); + } + else + { + tfe_http_std_field_write(tsg_ctx->replacing, field_id, field_value); + } tsg_ctx->execut_lua_sucess=1; tsg_ctx->rewrite_header=1; |
