-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
null content-type breaks request handling #39
Comments
Content-Type is thought to be required in Clack as it’s written in Lack’s README.
Did you get this error with some Clack handler or situation? |
I'm writing a backend for this: http://www.todobackend.com/client/index.html?http://localhost:5000 and I've discovered that their DELETE requests don't set the Content-Type header:
I'm just using a fairly simple ningle app: https://github.com/fiddlerwoaroof/cl-todo-backend/blob/master/routing.lisp#L33 using the Hunchentoot handler and something isn't being setup correctly. |
I think the code only runs when
|
Ah, yeah, the relevant changes to data-lens haven't made it up to quicklisp |
This was caused because the latest Http-Body assumes fukamachi/http-body@f7230c8#diff-a12cf9db7767789dad9bcd52d001cb46L14-R16 |
If the Content-Type header isn't passed, this code passes a content-type of NIL to HTTP-BODY:PARSE, preventing the request from being processed properly.
lack/src/request.lisp
Lines 105 to 108 in 8ddb653
This could be fixed either by adding a null check or defaulting content-type to
text/plain
when it's not passed.The text was updated successfully, but these errors were encountered: