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

Kikobeats / reachable-url / 30754219590
100%

Build:
DEFAULT BRANCH: master
Ran 02 Aug 2026 03:23PM UTC
Jobs 1
Files 1
Run time 1min
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

02 Aug 2026 03:22PM UTC coverage: 100.0%. Remained the same
30754219590

push

github

web-flow
feat: add maxBody to keep part of an aborted download (#78)

* feat: add maxBody to keep part of an aborted download

Reachability is answered by the status and headers, so the download is
cancelled and `body` comes back undefined. Some callers need the bytes
anyway: metascraper-logo-favicon reads `body[0]` to tell an image from an
HTML error page served as one, and the XSS scan in microlink/api reads
the whole favicon.

Until now the only way to keep a body was passing `cache`, which meant
asking for a cache nobody wanted. `maxBody` says it directly: how many
bytes to read before cancelling, `0` by default, `Infinity` for all of
them.

Above one byte the `Range` header is dropped, since asking for
`bytes=0-0` while wanting more would have a server that honors ranges
answer with that single byte.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018JDsM3McLV5LtR3rFd97Sb

* refactor: trim the maxBody path

Buffer.concat with a length copies only the bytes kept, instead of
copying every buffered byte and then pinning them behind a view. The
data listener detaches on the first chunk that satisfies the cap, so
the chunks already in flight after the cancel do not redo the concat.

The prefix lands on the response got already resolves, which drops the
outer variable that carried it across the request.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019p5HQaUfUp4HTXpsqpkMRP

* refactor: fold maxBody into the abort decision

The option is destructured off the signature, so the header decision and
the body decision read the same value instead of parsing options twice,
and Infinity joins cache and retry inside the predicate that enumerates
every reason to keep the body.

An entity the headers already declare small enough is left to got, which
reads it to the end anyway, instead of buffering it a second time.

Co-Authored-By: Claude... (continued)

55 of 55 branches covered (100.0%)

Branch coverage included in aggregate %.

44 of 44 new or added lines in 1 file covered. (100.0%)

175 of 175 relevant lines covered (100.0%)

315.73 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30754219590.1 02 Aug 2026 03:23PM UTC 1
100.0
GitHub Action Run
Source Files on build 30754219590
  • Tree
  • List 1
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30754219590
  • 7e0c6762 on github
  • Prev Build on master (#30754219603)
  • Next Build on master (#30846302928)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc