• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

serverless-nextjs / serverless-next.js / 1000 / 6
91%
master: 91%

Build:
DEFAULT BRANCH: master
Ran 26 Mar 2020 09:39AM UTC
Files 34
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Mar 2020 09:32AM UTC coverage: 96.157%. Remained the same
1000.6

push

travis-ci

web-flow
Fix the issue with TypeError hasHeader is not a function (#329)

* Fix the issue with TypeError hasHeader is not a function

When deploying to netlify or AWS (both depend on AWS-lambda)
The SSR components (using `getServerSideProps` fails with the following
error:
```
  ERROR	TypeError: res.hasHeader is not a function
    at sendPayload (/var/task/pages/test.js:5787:41)
    at renderReqToHTML (/var/task/pages/test.js:1773:13)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Module.render (/var/task/pages/test.js:1816:22)
```
This is caused by nextjs trying to use the default node `hasHeader`
method here: https://github.com/zeit/next.js/blob/v9.3.1/packages/next/next-server/server/send-payload.ts#L25

This commit fix the issue reported here: https://github.com/zeit/next.js/issues/11223
which I could verify also happening on our stack by adding the method
that mimics the nodeJS method (using `res.getHeader(name)` internally wrapping it
in boolean response)

* Add testing for `hasHeader` method

328 of 358 branches covered (91.62%)

Branch coverage included in aggregate %.

923 of 943 relevant lines covered (97.88%)

53.73 hits per line

Source Files on job 1000.6
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 1521
  • Travis Job 1000.6
  • 98f55989 on github
  • Prev Job for on master (#1007.5)
  • Next Job for on master (#1027.6)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc