mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-19 12:23:19 +01:00
25 lines
1.1 KiB
Java
25 lines
1.1 KiB
Java
package org.apache.http.protocol;
|
|
|
|
import java.io.IOException;
|
|
import org.apache.http.HttpException;
|
|
import org.apache.http.HttpResponse;
|
|
import org.apache.http.HttpResponseInterceptor;
|
|
import org.apache.http.annotation.Contract;
|
|
import org.apache.http.annotation.ThreadingBehavior;
|
|
import org.apache.http.util.Args;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Contract(threading = ThreadingBehavior.SAFE)
|
|
/* loaded from: classes11.dex */
|
|
public class ResponseDate implements HttpResponseInterceptor {
|
|
private static final HttpDateGenerator DATE_GENERATOR = new HttpDateGenerator();
|
|
|
|
@Override // org.apache.http.HttpResponseInterceptor
|
|
public void process(HttpResponse httpResponse, HttpContext httpContext) throws HttpException, IOException {
|
|
Args.notNull(httpResponse, "HTTP response");
|
|
if (httpResponse.getStatusLine().getStatusCode() < 200 || httpResponse.containsHeader("Date")) {
|
|
return;
|
|
}
|
|
httpResponse.setHeader("Date", DATE_GENERATOR.getCurrentDate());
|
|
}
|
|
}
|