Closed nokaa closed 8 years ago
The relevant assertion can be found in the parser. After the request body is received a response should be sent. If the user does not send a complete response this assertion fails. This means either rotor-http's state machine is wrong at some point or your code does not send under some circumstances a complete response. Is your code public so I can take a look?
I second what @pyfisch said. And regardless of whether this specific problem is a problem with rotor-http or user code. We will have such issues with user code anyway.
So the question is if we can do better at this? Allow sending broken request is bad, and an assertion is probably a good way to discover this early on during development.
On the other hand, returning None
from any handler in case you can't do anything better (like can't fetch next portion of the data in the middle of a request), is just so tempting.
If it wasn't clear I mean, we could:
(I'm pretty skeptical about (3) because this may delay when user will find out if there is something wrong with their code)
@nokaa at least in cases Board(_)
and Thread(_)
nothing is sent. And this is the case for assertion. You should send 501 Not Implemented
page or 404 error page instead of doing nothing in that cases until they are implemented.
@nokaa Is this solved?
It seems like it. I haven't run into this since. My apologoies for the late response.
I received this error earlier:
At the time I was just sending data to a client, and I have not been able to replicate the error.