ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/tomcat/util/http/CookieProcessor.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/tomcat/util/http/CookieProcessor.java
Status
scanned
Type
file
Name
CookieProcessor.java
Extension
.java
Programming language
Java
Mime type
text/html
File type
HTML document, ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
2517 (2.5 KB)
MD5
f4e0dd038f1f472ea5c799c91526e35c
SHA1
51f91d4a916af178d59612653ffdc814994837d3
SHA256
2715a25f626346a5327c73ebce48c23518b27e24e018ecc7dbc956fd1301e261
SHA512

      
    
SHA1_git
53624be74539e2833ba06fe16000e4b09f0a40af
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
CookieProcessor.java | 2.5 KB |

/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tomcat.util.http; import java.nio.charset.Charset; import jakarta.servlet.http.Cookie; import jakarta.servlet.http.HttpServletRequest; public interface CookieProcessor { /** * Parse the provided headers into server cookie objects. * * @param headers The HTTP headers to parse * @param serverCookies The server cookies object to populate with the results of the parsing */ void parseCookieHeader(MimeHeaders headers, ServerCookies serverCookies); /** * Generate the {@code Set-Cookie} HTTP header value for the given Cookie. This method receives as parameter the * servlet request so that it can make decisions based on request properties. One such use-case is deciding if the * SameSite attribute should be added to the cookie based on the User-Agent or other request header because there * are browser versions incompatible with the SameSite attribute. This is described by * <a href="https://www.chromium.org/updates/same-site/incompatible-clients">the Chromium project</a>. * * @param request The servlet request * @param cookie The cookie for which the header will be generated * * @return The header value in a form that can be added directly to the response */ String generateHeader(Cookie cookie, HttpServletRequest request); /** * Obtain the character set that will be used when converting between bytes and characters when parsing and/or * generating HTTP headers for cookies. * * @return The character set used for byte&lt;-&gt;character conversions */ Charset getCharset(); }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
36.17
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9
https://www.chromium.org/updates/same-site/incompatible-clients 39 39