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

feat(nextcloud): add custom http date parser to support rfc822 time zone offsets #1763

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

Leptopoda
Copy link
Member

Signed-off-by: Nikolas Rimikis leptopoda@users.noreply.github.com

Fixes the issue of parsing an RFC822 date with a timezone offset.
The code is pulled in from the upstream http_parser package and adjusted to also handle our use case.
I disabled failing lint rules instead of fixing them to keep the code similar to upstream.

As a bonus I also converted the code to directly use a tz.TZDateTime so we can avoid parsing it later on.

@Leptopoda Leptopoda requested a review from provokateurin March 13, 2024 11:19
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

PR title is wrong

packages/nextcloud/lib/src/utils/http_parser.dart Outdated Show resolved Hide resolved
packages/nextcloud/test/http_date_test.dart Show resolved Hide resolved
@Leptopoda Leptopoda changed the title refactor(nextcloud): use package:timezone TZDateTime for dates feat(neon_framework): add custom http date parser to support rfc822 time zone offsets Mar 13, 2024
@Leptopoda Leptopoda force-pushed the refactor/use_timezone_datetime branch from 8df34ea to c320200 Compare March 13, 2024 11:35
Base automatically changed from refactor/use_timezone_datetime to main March 13, 2024 11:57
@Leptopoda Leptopoda force-pushed the fix/neon_framework/http_date_parsing branch from b33219c to b4610a6 Compare March 13, 2024 12:19
@Leptopoda Leptopoda requested a review from provokateurin March 13, 2024 12:19
@Leptopoda Leptopoda enabled auto-merge March 13, 2024 12:19
@Leptopoda Leptopoda force-pushed the fix/neon_framework/http_date_parsing branch 2 times, most recently from d884d98 to 617b446 Compare March 13, 2024 12:28
@provokateurin
Copy link
Member

Btw shouldn't the commit scope be the nextcloud package?

…one offsets

Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
@Leptopoda Leptopoda force-pushed the fix/neon_framework/http_date_parsing branch from 617b446 to 6ab8f5d Compare March 13, 2024 14:43
@Leptopoda Leptopoda changed the title feat(neon_framework): add custom http date parser to support rfc822 time zone offsets feat(nextcloud): add custom http date parser to support rfc822 time zone offsets Mar 13, 2024
@Leptopoda Leptopoda merged commit 62eb066 into main Mar 13, 2024
8 checks passed
@Leptopoda Leptopoda deleted the fix/neon_framework/http_date_parsing branch March 13, 2024 15:06
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