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

(-)java/org/apache/catalina/connector/Request.java (-7 / +18 lines)
Lines 114-124 Link Here
114
    }
114
    }
115
115
116
    public Request() {
116
    public Request() {
117
    	
118
    	formats = new SimpleDateFormat[format.length];
119
    	
120
    	for(int i = 0; i < formats.length; i++) {
121
        	formats[i] = (SimpleDateFormat) format[i].clone();
122
        }
117
123
118
        formats[0].setTimeZone(GMT_ZONE);
119
        formats[1].setTimeZone(GMT_ZONE);
120
        formats[2].setTimeZone(GMT_ZONE);
121
122
    }
124
    }
123
125
124
126
Lines 173-185 Link Here
173
     * Notice that because SimpleDateFormat is not thread-safe, we can't
175
     * Notice that because SimpleDateFormat is not thread-safe, we can't
174
     * declare formats[] as a static variable.
176
     * declare formats[] as a static variable.
175
     */
177
     */
176
    protected SimpleDateFormat formats[] = {
178
    protected SimpleDateFormat[] formats;
177
        new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US),
179
    
180
    private static final SimpleDateFormat format[] = {
181
    	new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US),
178
        new SimpleDateFormat("EEEEEE, dd-MMM-yy HH:mm:ss zzz", Locale.US),
182
        new SimpleDateFormat("EEEEEE, dd-MMM-yy HH:mm:ss zzz", Locale.US),
179
        new SimpleDateFormat("EEE MMMM d HH:mm:ss yyyy", Locale.US)
183
        new SimpleDateFormat("EEE MMMM d HH:mm:ss yyyy", Locale.US)
180
    };
184
    	};
185
    
186
    static {
187
    	for(SimpleDateFormat i : format) {
188
    		i.setTimeZone(GMT_ZONE);
189
    	}
190
    }
181
191
182
192
193
183
    /**
194
    /**
184
     * The default Locale if none are specified.
195
     * The default Locale if none are specified.
185
     */
196
     */

Return to bug 48922