Conversation
|
Updated the PR to support Netty's For reference, I did try and add support for If you know how to fix this, I'll gladly re-add support for JAX-RS cookies as well. |
|
@chtyim Ping :) |
|
@chtyim Another gentle reminder. |
|
@chtyim Any change of getting this merged? |
albertshau
left a comment
There was a problem hiding this comment.
one actual comment, the rest are just about code style.
Thanks for the contribution!
| //Setup args for reflection call | ||
| Object [] args = new Object[paramsInfo.size()]; | ||
| // Parse cookies | ||
| Map<String, Cookie> cookies = cookieParser.parseCookies(request); |
There was a problem hiding this comment.
One of the problems with parsing here is that an invalid cookie will cause the request to fail, even if the method doesn't care about it. It could potentially cause backwards incompatibilities, as somebody could upgrade this library and then see their requests failing due to some headers they never looked at before.
instead of parsing all the cookies here, it would be better to only lookup the relevant header in the getCookieParamValue() method and decode it there.
There was a problem hiding this comment.
I have moved it to the method so it will only be run on-demand. It does mean though that every cookie will result in parsing all the cookies. Is there a way to cache this? All the members on the HttpResourceModel are final and set in the constructor, so I wasn't sure if it would be ok to add a cookie parsing cache there, which is the approach I'd normally take.
Implemented
@CookieParamsupport forStringand Netty'sCookietype.