1
1
/*
2
- * Copyright (c) 1997, 2021 Oracle and/or its affiliates and others.
2
+ * Copyright (c) 1997, 2022 Oracle and/or its affiliates and others.
3
3
* All rights reserved.
4
4
* Copyright 2004 The Apache Software Foundation
5
5
*
@@ -85,8 +85,9 @@ public interface HttpServletRequest extends ServletRequest {
85
85
* The date is returned as the number of milliseconds since January 1, 1970 GMT. The header name is case insensitive.
86
86
*
87
87
* <p>
88
- * If the request did not have a header of the specified name, this method returns -1. If the header can't be converted
89
- * to a date, the method throws an <code>IllegalArgumentException</code>.
88
+ * If the request did not have a header of the specified name, this method returns -1. If there are multiple headers
89
+ * with the same name, this method returns the value of the first header in the request. If the header can't be
90
+ * converted to a date, the method throws an <code>IllegalArgumentException</code>.
90
91
*
91
92
* @param name a <code>String</code> specifying the name of the header
92
93
*
@@ -100,8 +101,8 @@ public interface HttpServletRequest extends ServletRequest {
100
101
/**
101
102
* Returns the value of the specified request header as a <code>String</code>. If the request did not include a header
102
103
* of the specified name, this method returns <code>null</code>. If there are multiple headers with the same name, this
103
- * method returns the first head in the request. The header name is case insensitive. You can use this method with any
104
- * request header.
104
+ * method returns the value of the first header in the request. The header name is case insensitive. You can use this
105
+ * method with any request header.
105
106
*
106
107
* @param name a <code>String</code> specifying the header name
107
108
*
@@ -144,7 +145,8 @@ public interface HttpServletRequest extends ServletRequest {
144
145
145
146
/**
146
147
* Returns the value of the specified request header as an <code>int</code>. If the request does not have a header of
147
- * the specified name, this method returns -1. If the header cannot be converted to an integer, this method throws a
148
+ * the specified name, this method returns -1. If there are multiple headers with the same name, this method returns the
149
+ * value of the first header in the request. If the header cannot be converted to an integer, this method throws a
148
150
* <code>NumberFormatException</code>.
149
151
*
150
152
* <p>
0 commit comments