-
Notifications
You must be signed in to change notification settings - Fork 520
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
Request contains nil :body and :query-string #329
Comments
I think at least |
If the Jetty adapter is doing the wrong thing it should be fixed. I'm not sure whether the best thing to do is to make the keys nillable. I currently lean toward not, as that gives more relevance to If Immutant and Aleph use a custom map implementation, I don't see any reason why they also can't dictate a key as being missing. |
Both Aleph & Immutant use zero-copy requests where the shape of the request needs to be defined forehand and the values are lazily fetched on-demand from the underlaying impementation (Netty or Undertow). This is a big win in performance, but can't strip away keys (in a performant way). |
If In terms of pros and cons, here's how I see it: Pros for adding nils
Cons
I'm not quite sure what the best option is. My inclination is that allowing nils would make life a little easier for adapter writers, but might make the job of end developers a little more complex. My current inclination is to side with the latter, but I'm open to convincing. |
I don't have a strong argument either way. My feeling from an idiomatic perspective is that |
I've tried using both jetty and httpkit, in both cases my request maps contain
nil
values for the optional keys:body
and:query-string
; this is not compliant with the:ring/request
spec. Is it possible to remove the keys from the request map instead of setting them tonil
in order to remain spec compliant?The text was updated successfully, but these errors were encountered: