-
-
Notifications
You must be signed in to change notification settings - Fork 110
Consider returning a 500 instead of... nothing #22
Comments
I thought about it for a while, comparing what I have and considering the potential scenarios, and I've come to the conclusion that aborting the connection is probably the only reasonable behaviour here and at present the only feasible behaviour. Some facts:
The design which would allow the sending of a 500 Internal Server Error response in this situation is:
Working across multiple tasks is clearly going to be something which must be supported somewhere along the line (I should consult with @brson about what the plan is with cross-task TCP sockets in the runtime—it could also affect the design for request pipelining), but at present I think we're best to avoid that complexity and inefficiency and wait. Moreover, sending a generic 500 Internal Server Error response doesn't strike me as what the library should be doing; I'd think that to be the domain of a framework. (I haven't compared it with other HTTP libraries to see what they do, but that's my feeling on the matter.) Said framework could also do logging, etc. Constraining the scope of rust-http seems to me to be the sensible path here. What thinkest thou in response? |
That seems reasonable to me. The cross-task TcpStream is really something I just thought it was odd that as library user, task failure didn't trigger On Sun, Oct 6, 2013 at 12:27 AM, Chris Morgan [email protected]:
|
OK, docs it shall be. |
Update to latest Rust
But logged:
I think the server should return a 500 here?
The text was updated successfully, but these errors were encountered: