-
Notifications
You must be signed in to change notification settings - Fork 24
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
breaks if Cache-Control is array #28
Comments
Oops, indeed! Could you make it detect non-string header value and run |
That is indeed how I have patched it locally. +const normalizeHeaders = (headers: HeadersType): HeadersType => {
+ const normalizedHeaders = {
+ ...headers,
+ };
+
+ // @see https://github.com/kornelski/http-cache-semantics/issues/28
+ if (Array.isArray(normalizedHeaders['cache-control'])) {
+ normalizedHeaders['cache-control'] = normalizedHeaders['cache-control'].join(', ');
+ }
+
+ return normalizedHeaders;
+};
+
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Produces error:
The text was updated successfully, but these errors were encountered: