Skip to content

Commit

Permalink
fix(proxy-wasm) v0.1.0 get_header_map_value return buffer is NULL, no…
Browse files Browse the repository at this point in the history
…t empty
  • Loading branch information
thibaultcha committed Apr 15, 2021
1 parent ec364be commit 6e97a97
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/common/proxy_wasm/ngx_proxy_wasm_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ ngx_proxy_wasm_hfuncs_get_header_map_value(ngx_wavm_instance_t *instance,
ngx_list_t *list;
ngx_str_t *value;
ngx_proxy_wasm_t *pwm;
static const u_char empty[] = "";
ngx_http_wasm_req_ctx_t *rctx = instance->ctx->data;
ngx_http_request_t *r = rctx->r;

Expand Down Expand Up @@ -244,7 +243,7 @@ ngx_proxy_wasm_hfuncs_get_header_map_value(ngx_wavm_instance_t *instance,
value = ngx_proxy_wasm_get_map_value(list, (u_char *) key, key_len);
if (value == NULL) {
if (pwm->abi_version == NGX_PROXY_WASM_0_1_0) {
*rbuf = (uintptr_t) ∅
rbuf = NULL;
*rlen = 0;
return ngx_proxy_wasm_result_ok(rets);
}
Expand Down

0 comments on commit 6e97a97

Please sign in to comment.