You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The design of the CookieFactory should look for an META-INF/services/io.micronaut.http.cookie.CookieFactory resource (and use it for the class name) and if not found, then it should fall back to HttpCookieFactory.
Actual Behaviour
However, due to the presence of the META-INF/services/io.micronaut.http.cookie.CookieFactory within the micronaut-http library, and this file points to the fallback of HttpCookieFactory, then other overrides are frequently ignored.
So, if the micronaut-http-netty library is present, it has its own META-INF/services/io.micronaut.http.cookie.CookieFactory that points at its own CookieFactory, and it is frequently ignored. Unfortunately, it's even worse, since there's no defined order of ClassLoader.getResources, so depending on fairly interminate factors, sometimes the micronaut-http-netty version will be returned, and sometimes the micronaut-http version will be.
I think the correct response would be to delete the file micronaut-core/http/src/main/resources/META-INF/services/io.micronaut.http.cookie.CookieFactory
This should allow the micronaut-http-netty copy to be used if present, and then fallback will work if it's not.
Steps To Reproduce
No response
Environment Information
No response
Example Application
No response
Version
4.3, 4.4
The text was updated successfully, but these errors were encountered:
Expected Behavior
The design of the CookieFactory should look for an META-INF/services/io.micronaut.http.cookie.CookieFactory resource (and use it for the class name) and if not found, then it should fall back to HttpCookieFactory.
Actual Behaviour
However, due to the presence of the META-INF/services/io.micronaut.http.cookie.CookieFactory within the micronaut-http library, and this file points to the fallback of HttpCookieFactory, then other overrides are frequently ignored.
So, if the micronaut-http-netty library is present, it has its own META-INF/services/io.micronaut.http.cookie.CookieFactory that points at its own CookieFactory, and it is frequently ignored. Unfortunately, it's even worse, since there's no defined order of ClassLoader.getResources, so depending on fairly interminate factors, sometimes the micronaut-http-netty version will be returned, and sometimes the micronaut-http version will be.
I think the correct response would be to delete the file micronaut-core/http/src/main/resources/META-INF/services/io.micronaut.http.cookie.CookieFactory
This should allow the micronaut-http-netty copy to be used if present, and then fallback will work if it's not.
Steps To Reproduce
No response
Environment Information
No response
Example Application
No response
Version
4.3, 4.4
The text was updated successfully, but these errors were encountered: