Open GertThiel opened 5 years ago
Hi Gert,
Free tests! Thanks a bunch! I will go over these one by one as soon as I can find the time, I'm very busy until the middle of next week.
Just to clear up, you seem to have found two separate bugs (or non-conformities):
You seem to want to create a route that matches a request for a certain resource in the text/html
content type with utf-8
as a charset specifically. That is, it should be a different route than the same resource presented with text/html
and, say latin-1
. Is this what you want? Or would it suffice that Snooze responds with utf-8
by default?
I don't quite understand this second problem. Is it just a case that you want ?queries=
to have the same effect as ?queries=1
?
Hi João.
Since you have limited time to spare I rephrase this issue to guide you to the most important thing first and only:
Situation:
I have:
(snooze:defroute queries (:get "application/json" &key (queries 1))
(jonathan:to-json (get-some-random-records (ensure-integer-is-between-one-and-five-hundreds queries))))
Expectation:
Every request
GET localhost:8080/queries=1
GET localhost:8080/queries=FOO
GET localhost:8080/queries=
shall call my handler with the queries
parameter and it's value 1, "FOO" or nil
.
Bug:
GET localhost:8080/queries=
does not even call my handler. I get no chance to fix the parameter.
Snozze must not repair the query variable. That's not the domain of a router, but my application's responsibility.
Please ignore every other regression in my original post.
Hi João.
The TechEmpower Framework Benchmark (or TFB for short) guides many people who are looking for a web framework for their next project. Common Lisp was totally absent until now.
Last weekend I finished adding Eitaro Fukamachi's Woo to the TFB (pull requests 4684 and 4690).
Now I'm adding Snooze to the TFB. And found a few regressions.
TFB is quite demanding e.g. has dedicated expectations how a framework must react to requests.
The Fortunes tests UTF-8 encoded HTML but disallows
<meta>
tag:Because
snooze:defroute fortunes (:get "text/html; charset=UTF-8")
does not work, I have to resort to patching the response (and adding anotherServer
header by the way).The Multiple Database Queries and the Database Updates has requirements Snooze can't comply with:
I have
and
ensure-integer-is-between-one-and-five-hundreds
can handle an erroneous request likeGET localhost:8080/queries=FOO
but notGET localhost:8080/queries=
(parameter with an empty value).I consider that a bug because query parameters with empty values are quite normal e.g. in data table filter builders.
You find my complete source code in my related GitHub repository.
Can you help?
Thank in advance.
Gert