Skip to content

breaks if Cache-Control is array #28

@gajus

Description

@gajus
curl -v https://www.reservaentradas.com/cines
< HTTP/1.1 200 OK
< Date: Wed, 05 Feb 2020 18:51:26 GMT
< Server: Apache/2.2.22 (Debian)
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Vary: Accept-Encoding
< Cache-Control: max-age=0, no-cache
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=utf-8
<

Produces error:

TypeError: header.trim is not a function
          at parseCacheControl (/Users/gajus/Documents/dev/rayroute/rayman/node_modules/http-cache-semantics/index.js:62:26)
          at new CachePolicy (/Users/gajus/Documents/dev/rayroute/rayman/node_modules/http-cache-semantics/index.js:119:23)
          at action (/Users/gajus/Documents/dev/rayroute/rayman/src/interceptors/createCacheInterceptor/index.js:68:27)
          at Object.responseActions (/Users/gajus/Documents/dev/rayroute/rayman/node_modules/@rayroute/raygun/src/factories/createInterceptorActions.js:152:22)
          at processTicksAndRejections (internal/process/task_queues.js:97:5)
          at handleRequest (/Users/gajus/Documents/dev/rayroute/rayman/node_modules/@rayroute/raygun/src/factories/createRequestHandler.js:69:28)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions