-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misultin doesn't like POST without Content-Length #101
Comments
hi, thank you for this report. misultin does not crash. it raises an error on purpose, as per this line: as you can see, it perfectly handles the response error back, and this is intended behaviour. i see your point and i believe that it should not log an error but just a debug message, so i'll change that. i also believe that it should return a 411 Length Required error instead of a 400, and not do what other servers do, whoever they are :) i'll provide a patch asap. |
Right. Just a quick dig through rfc: Section 14.13 of RFC2616 http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
So, rfc leaves a possiblity of not sending the header. Later on http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4
So, if closing a connection is not allowed, thus not sending content-length must mean content-length of zero. Just saying. |
The cases are three: . the client sends a content-length -> handled Re the closing of a connection: what the RFC states is that obviously the client has to wait for a response so it cannot just close it to say that it's done with sending a request. I am not sure I get why you deduct from it that "not sending content-length must mean content-length of zero". As you pointed out, RFC defines exactly what to do with this case, and it's not "assume that it's zero". Are you referring to something that I've missed? r. |
Nope. I'm talking about the 3rd case. |
thank you for this. misultin has been discontinued, my reasons here. r. |
1. Run simplistic misultin http server, like this
2. Run curl:
Result:
Logs say:
3. Run curl with Content-Length set to 0:
Result:
Ie: Misultin crashes when POST is without content-length. I think it is reasonable to assume that when content-length is not present, no content will be sent. This is what other servers do.
The text was updated successfully, but these errors were encountered: