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
Please see below test case where it shows that addHeader/getHeader methods from MockHttpServletResponse object do not return the same value; particularly the Comment part is stripped out.
I tried adding the same in Jetty container, and Jetty does not seem to strip the comment part. Also note that other header names like Set-CookieTest preserve the Comment part which seems to indicate that it only strips when encountering the Set-Cookie header name.
sbrannen
changed the title
MockHttpServletResponse addHeader does not allow Comment part with Set-Cookie headername
MockHttpServletResponse addHeader does not allow Comment part with Set-Cookie header
Jun 30, 2022
I'm using the following dependency for using
MockHttpServletResponse
for unit tests.Please see below test case where it shows that
addHeader/getHeader
methods fromMockHttpServletResponse
object do not return the same value; particularly theComment
part is stripped out.I tried adding the same in Jetty container, and Jetty does not seem to strip the comment part. Also note that other header names like
Set-CookieTest
preserve theComment
part which seems to indicate that it only strips when encountering theSet-Cookie
header name.Output:
MockHttpServletResponse: NOT_SAFE=; Path=/; Domain=mydomain.com; Expires=Thu, 1 Jan 1970 00:00:00 GMT
The text was updated successfully, but these errors were encountered: