CrowdHailer / Ace

HTTP web server and client, supports http1 and http2
https://hex.pm/packages/ace
MIT License
305 stars 26 forks source link

Large response body fails #142

Open varnerac opened 4 years ago

varnerac commented 4 years ago

When returning a response over 65k bytes, Ace's HTTP2 service fails, with a timeout. We've verified locally with Mojito and Gun clients. I've added a reproducer here:

https://github.com/varnerac/Ace/tree/large_response_reproducer/

varnerac commented 4 years ago

Should clarify that the reproducing test is https://github.com/varnerac/Ace/blob/large_response_reproducer/test/ace/http2_test.exs#L277-L292

It relies on a change in the simple app here: https://github.com/varnerac/Ace/blob/large_response_reproducer/test/support.exs#L110

CrowdHailer commented 4 years ago

Could you open a PR to add this test, even without the fix.

However instead of modifying simple app just make the greeting be an enormous binary https://github.com/varnerac/Ace/blob/large_response_reproducer/test/ace/http2_test.exs#L280

CharlesOkwuagwu commented 4 years ago

Hi @varnerac could you eventually solve the large body issue?

I seem to be having same/similar issues downloading large files via ssl, same code worked fine on clear-text

varnerac commented 4 years ago

I did not

CharlesOkwuagwu commented 4 years ago

@varnerac Please see if this works for you https://github.com/CrowdHailer/Ace/pull/154

varnerac commented 4 years ago

@CharlesOkwuagwu I’ll try to look this evening. In the meantime, you could add the test from https://github.com/CrowdHailer/Ace/pull/151 to your PR as a test.