Do not set the default HTTP version of cache response messages

This commit is contained in:
Oleg Kalnichevski 2023-12-24 17:49:44 +01:00
parent 6a497be400
commit c3d99b130c
1 changed files with 0 additions and 2 deletions

View File

@ -39,7 +39,6 @@ import org.apache.hc.core5.http.HttpHeaders;
import org.apache.hc.core5.http.HttpRequest;
import org.apache.hc.core5.http.HttpResponse;
import org.apache.hc.core5.http.HttpStatus;
import org.apache.hc.core5.http.HttpVersion;
import org.apache.hc.core5.http.Method;
import org.apache.hc.core5.http.message.BasicHeader;
import org.apache.hc.core5.util.TimeValue;
@ -66,7 +65,6 @@ class CachedHttpResponseGenerator {
SimpleHttpResponse generateResponse(final HttpRequest request, final HttpCacheEntry entry) throws ResourceIOException {
final Instant now = Instant.now();
final SimpleHttpResponse response = new SimpleHttpResponse(entry.getStatus());
response.setVersion(HttpVersion.DEFAULT);
response.setHeaders(entry.getHeaders());