MCPcopy Index your code
hub / github.com/apache/tomcat / setHttpOnly

Method setHttpOnly

java/jakarta/servlet/http/Cookie.java:362–368  ·  view source on GitHub ↗

Sets the flag that controls if this cookie will be hidden from scripts on the client side. @param httpOnly The new value of the flag @since Servlet 3.0

(boolean httpOnly)

Source from the content-addressed store, hash-verified

360 * @since Servlet 3.0
361 */
362 public void setHttpOnly(boolean httpOnly) {
363 if (httpOnly) {
364 setAttributeInternal(HTTP_ONLY, EMPTY_STRING);
365 } else {
366 setAttributeInternal(HTTP_ONLY, null);
367 }
368 }
369
370
371 /**

Callers 9

testSameSiteCookiesMethod · 0.95
testHttpOnlySetMethod · 0.95
testHttpOnlyUnsetMethod · 0.95
testCloneMethod · 0.95
invokeMethod · 0.95
createSessionCookieMethod · 0.95
registerMethod · 0.95
invokeMethod · 0.95

Calls 1

setAttributeInternalMethod · 0.95

Tested by 5

testSameSiteCookiesMethod · 0.76
testHttpOnlySetMethod · 0.76
testHttpOnlyUnsetMethod · 0.76
testCloneMethod · 0.76