-
-
Notifications
You must be signed in to change notification settings - Fork 14
fix: do spec-compliant date parsing #409
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
Conversation
| @@ -0,0 +1,295 @@ | |||
| /** | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is grabbed straight from undici, do we really need to have a copy of this in our code? Is there a 3rd party library we can use? I really want to avoid us from maintaining such kind of code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nodejs/undici I hope you don't mind the ping, but is this date parsing logic something y'all would consider exposing?
It looks like a couple of utils are currently exposed: https://github.com/nodejs/undici/blob/674ae24d6e61a3ef62b4b3e8677fcae52c0fa068/index.js#L60-L63
So, would it be viable to add https://github.com/nodejs/undici/blob/674ae24d6e61a3ef62b4b3e8677fcae52c0fa068/lib/util/date.js to that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is grabbed straight from undici, do we really need to have a copy of this in our code? Is there a 3rd party library we can use? I really want to avoid us from maintaining such kind of code.
Why not? We have parsing logic already for other things such as the range header
ovflowd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Signed-off-by: flakey5 <[email protected]>
|
I'm gonna merge & deploy this now just to stop us from getting spammed with more alerts, but we can continue talking about if we want to use a package for this here or in an issue or on Slack if y'all want |
|
I think best thing would be an issue or PR in undici to expose this util? |
No description provided.