SPR-7706 - 304 responses should not have non-0 Content-Length
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* 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
|
||||
* 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,
|
||||
@@ -121,11 +121,11 @@ public class ResourceHttpRequestHandler extends WebContentGenerator implements H
|
||||
}
|
||||
|
||||
// header phase
|
||||
setHeaders(response, resource, mediaType);
|
||||
if (new ServletWebRequest(request, response).checkNotModified(resource.lastModified())) {
|
||||
logger.debug("Resource not modified - returning 304");
|
||||
return;
|
||||
}
|
||||
setHeaders(response, resource, mediaType);
|
||||
|
||||
// content phase
|
||||
if (METHOD_HEAD.equals(request.getMethod())) {
|
||||
|
||||
Reference in New Issue
Block a user