arturobernalg commented on PR #500:
URL:
https://github.com/apache/httpcomponents-core/pull/500#issuecomment-2426943351
> @arturobernalg Looks unnecessary complex. So what if the `DATE` can be
successfully parsed but it represents a point in time when Jesus roamed
Galilea? What good that that make? I would either always replace `DATE` with
the current date/time without even looking at at the present value.
@ok2c So, basically, you are suggesting to do this:
```
public void process(final HttpResponse response, final EntityDetails entity,
final HttpContext context)
throws HttpException, IOException {
Args.notNull(response, "HTTP response");
final int status = response.getCode();
if (status >= HttpStatus.SC_OK) {
response.setHeader(HttpHeaders.DATE,
HttpDateGenerator.INSTANCE.getCurrentDate());
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]