View | Details | Raw Unified | Return to bug 60876
Collapse All | Expand All

(-)a/java/org/apache/tomcat/util/http/Rfc6265CookieProcessor.java (-6 / +6 lines)
Lines 120-126 public class Rfc6265CookieProcessor extends CookieProcessorBase { Link Here
120
        int maxAge = cookie.getMaxAge();
120
        int maxAge = cookie.getMaxAge();
121
        if (maxAge > -1) {
121
        if (maxAge > -1) {
122
            // Negative Max-Age is equivalent to no Max-Age
122
            // Negative Max-Age is equivalent to no Max-Age
123
            header.append(";Max-Age=");
123
            header.append("; Max-Age=");
124
            header.append(maxAge);
124
            header.append(maxAge);
125
125
126
            // Microsoft IE and Microsoft Edge don't understand Max-Age so send
126
            // Microsoft IE and Microsoft Edge don't understand Max-Age so send
Lines 128-134 public class Rfc6265CookieProcessor extends CookieProcessorBase { Link Here
128
            // browsers. See http://tomcat.markmail.org/thread/g6sipbofsjossacn
128
            // browsers. See http://tomcat.markmail.org/thread/g6sipbofsjossacn
129
129
130
            // Wdy, DD-Mon-YY HH:MM:SS GMT ( Expires Netscape format )
130
            // Wdy, DD-Mon-YY HH:MM:SS GMT ( Expires Netscape format )
131
            header.append (";Expires=");
131
            header.append ("; Expires=");
132
            // To expire immediately we need to set the time in past
132
            // To expire immediately we need to set the time in past
133
            if (maxAge == 0) {
133
            if (maxAge == 0) {
134
                header.append(ANCIENT_DATE);
134
                header.append(ANCIENT_DATE);
Lines 143-165 public class Rfc6265CookieProcessor extends CookieProcessorBase { Link Here
143
        String domain = cookie.getDomain();
143
        String domain = cookie.getDomain();
144
        if (domain != null && domain.length() > 0) {
144
        if (domain != null && domain.length() > 0) {
145
            validateDomain(domain);
145
            validateDomain(domain);
146
            header.append(";domain=");
146
            header.append("; Domain=");
147
            header.append(domain);
147
            header.append(domain);
148
        }
148
        }
149
149
150
        String path = cookie.getPath();
150
        String path = cookie.getPath();
151
        if (path != null && path.length() > 0) {
151
        if (path != null && path.length() > 0) {
152
            validatePath(path);
152
            validatePath(path);
153
            header.append(";path=");
153
            header.append("; Path=");
154
            header.append(path);
154
            header.append(path);
155
        }
155
        }
156
156
157
        if (cookie.getSecure()) {
157
        if (cookie.getSecure()) {
158
            header.append(";Secure");
158
            header.append("; Secure");
159
        }
159
        }
160
160
161
        if (cookie.isHttpOnly()) {
161
        if (cookie.isHttpOnly()) {
162
            header.append(";HttpOnly");
162
            header.append("; HttpOnly");
163
        }
163
        }
164
164
165
        return header.toString();
165
        return header.toString();

Return to bug 60876