roadrunner-server / roadrunner

🤯 High-performance PHP application server, process manager written in Go and powered with plugins
https://docs.roadrunner.dev
MIT License
7.95k stars 413 forks source link

[🐛 BUG]: File stream causes duplicate headers being sent #2077

Open rmikalkenas opened 1 day ago

rmikalkenas commented 1 day ago

No duplicates 🥲.

What happened?

I try to stream a large file using the streaming response example. Even though its working, but seems that the response headers get duplicated times the amount of chunks being sent. In case of many chunks - header max size limit is reached causing to errors.

Is it expected or am I doing somethig wrong?

image

Version (rr --version)

2024.2.1

How to reproduce the issue?

From example: https://docs.roadrunner.dev/docs/http/resp-streaming

Relevant log output

No response

rustatian commented 1 day ago

Hey @rmikalkenas 👋🏻 Could you please include the reproduction example in the ticket? I mean, I double checked my tests (based on the examples) and I don't see any duplicates...