Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

body_filter_by_lua breaks APIs in other contexts in anything greater then 1.19

Aperta
#324 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
lua, nginx

Direzione di ricerca

Inizia eseguendo il repository di riproduzione collegato con le immagini Docker di OpenResty 1.19 e successive. Confronta il comportamento quando body_filter_by_lua e content_by_lua_block sono entrambi definiti, concentrandoti sulle richieste sottoposte a buffering e su ngx.flush(true); l'attività è completata quando è stato determinato se lua-resty-http è coinvolto e il problema è stato documentato o corretto con un risultato riproducibile.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I've logged this as a bug over in the lua-nginx-module repo but incase it's a bug in this code base instead thought I would log it here as well.

https://github.com/openresty/lua-nginx-module/issues/2372


We've been attempting to upgrade some legacy code to a newer version of openresty and hit a road block getting to anything greater then 1.19

We've found an issue that exists in any version greater then openresty 1.19 when using body_filter_by_lua and content_by_lua_block blocks.

I've created a reproduction case here - https://github.com/cdloh/body_filter_by_lua-bug-openresty

I've used lua-resty-http to make making the request easier.

When using both body_filter_by_lua and content_by_lua_block it's impossible to use APIs like ngx.flush(true) if there is any buffering going on. Eventually even if the flush code is only within content_by_lua blocks openresty complains about that API being disabled in body_filter_by_lua phases.

Note that you don't have to be actually doing anything in the body_filter_by_lua block at all. Simply having it defined causes the bug to occur.

You can run the some reproduction repo against 1.19 docker iamges and it work fine, however anything greater and it breaks.

Lingua principale
Lua
Stelle
2.1k
Fork
629
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ledgetech/lua-resty-http

Tutte le issue di ledgetech/lua-resty-http

Issue simili

Altre issue su Lua

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.