Closed PuercoPop closed 9 years ago
I could reproduce this error. Still I can't understand why it occurs.
Yeah I don't have a clear picture either, it could be a encoding related issue. When I use drakma to send the HTTP request (which uses utf-8 instead of latin-1 by default) I don't get the error. I plan to investigate further during the weekend.
I'm closing this because I think this is resolved accidentally in Clack v1.0.
(Clack v1.0 uses HTTP-Body to parse application/json
by jsown.)
Feel free to reopen this if you still have this problem.
Disclaimer: I'm not sure if the error is in the yason library's skip-whitespace method or in the clack package. But because the test case requieres ningle & clack I figured I report it here. By the way, I think the parsing the body with yason and storing it as an extra env attribute should probably be implemented as a middleware.
So bare bones test case is defining an endpoint that just spits the env out
and then hit the endpoint with curl:
and I get the following error (note that if I remove - H option the endpoint works fine):
Upon inspecting the #\ symbol the slime inspector shows me the following:
It appears to be whitespace, but that is weird as the parse% method is supposed to skip-whitespace
Also, I checked that #\ and #\Space are equivalent
P.D. Thank you not only for your libraries but also because of your strong focus on documentation (even if it not done yet)