Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor RequestIfRange class to use DateUtils for date parsing. #497

Merged

Conversation

arturobernalg
Copy link
Member

  • Updates the RequestIfRange class to utilize DateUtils for parsing standard HTTP dates.
  • Optimize time difference check in RequestIfRange with Instant API.


if (dateHeader == null) {
return;
}

final Instant lastModifiedHeader = DateUtils.parseStandardDate(request, HttpHeaders.LAST_MODIFIED);
Copy link
Member

@ok2c ok2c Oct 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arturobernalg lastModifiedHeader is likely not the best name now. lastModifiedInstant? Same deal with dateHeader. dateInstant?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ok2c Agree.
Changed.

@arturobernalg arturobernalg force-pushed the request-if-range-date-refactor branch from 3911e7c to 9801783 Compare October 24, 2023 11:03
* Updates the RequestIfRange class to utilize DateUtils for parsing standard HTTP dates.
* Optimize time difference check in RequestIfRange with Instant API.
@arturobernalg arturobernalg force-pushed the request-if-range-date-refactor branch from 9801783 to ad3f1ca Compare October 24, 2023 18:56
@arturobernalg arturobernalg merged commit f17ec7d into apache:5.4.x Oct 24, 2023
ok2c pushed a commit that referenced this pull request Dec 13, 2023
* Updates the RequestIfRange class to utilize DateUtils for parsing standard HTTP dates.
* Optimize time difference check in RequestIfRange with Instant API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants