[
https://issues.apache.org/jira/browse/TS-4045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15033334#comment-15033334
]
ASF GitHub Bot commented on TS-4045:
------------------------------------
Github user bgaff commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/357#discussion_r46250788
--- Diff: plugins/experimental/ts_lua/ts_lua_client_request.c ---
@@ -332,6 +348,10 @@ ts_lua_client_request_get_pristine_url(lua_State *L)
ts_lua_http_ctx *http_ctx;
http_ctx = ts_lua_get_http_ctx(L);
+ if (http_ctx == NULL) {
--- End diff --
given that this pattern is literally repeated everywhere, perhaps a macro
is in order:
```
#define GET_CONTEXT(ctx, list) \
ctx = ts_lua_get_http_ctx(list); \
if (ctx == NULL) { \
TS_ERROR(...); \
return; \
}
```
> Improvement for ts_lua plugin
> -----------------------------
>
> Key: TS-4045
> URL: https://issues.apache.org/jira/browse/TS-4045
> Project: Traffic Server
> Issue Type: Improvement
> Components: Lua, Plugins
> Reporter: Kit Chan
> Assignee: Kit Chan
> Fix For: 6.1.0
>
>
> 3 things to accomplish in this jira
> 1) add support for TSHttpTxnDebugSet
> 2) protect http context pointer access in api calls
> 3) fix a spelling mistake from "truncked" to "truncated"
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)