rgrinberg / opium

Sinatra like web toolkit for OCaml
MIT License
755 stars 67 forks source link

Is master broken atm? #205

Closed mudrz closed 4 years ago

mudrz commented 4 years ago

I just updated my opam packages and now all requests are just hanging

There is some initial response being received (for example the first line of an html page), but then nothing more until I cancel the request at which point the rest is streamed;

are you aware of something that might have broken opium?

tmattio commented 4 years ago

Hi @mudrz!

I'm not aware of any specific problem with master currently. I'm using Opium's master branch in a project and it's been working well. Do you think you could give me some code sample that reproduces to help me debug the issue?

mxmzdlv commented 4 years ago

I am using master branch and I've had the same issue -- I think content-length header is missing in the responses. Fixed by adding middleware 'Middleware.content_length'.

tmattio commented 4 years ago

Thanks for the pointer @mxmzdlv!

I removed the default content-length header when I added the content-length middleware, so that's most likely the issue. I opened a PR to revert it. @mudrz would you mind telling me if it fixes the issue you have?

To pin:

opam pin add -y opium_kernel https://github.com/tmattio/opium.git\#fix-content-length
mudrz commented 4 years ago

thanks @mxmzdlv and @tmattio I can confirm that both fixes are fixing the issue

tmattio commented 4 years ago

Great to hear, I'll merge the PR then, thank you!