Back to Explore

jshttp/etag

GitHub
1 watchersOpen source

Last release: 9/13/2017

This is a Node.js module that generates HTTP ETags (RFC 7232) for use in HTTP responses. It creates strong or weak ETags from the complete entity body (supports strings, Buffers, and fs.Stats, with an option to control weak validators).

Project status

  • The last upstream push is 2026-03-01, but the most recent documented version updates in the provided history are from 2017 (v1.8.1, v1.8.0, v1.7.0), so active maintenance is unclear, aside from intermittent repository activity.
  • Apparent update cadence is very low, with no versioned updates shown after 2017, indicating a long maintenance gap rather than regular releases.

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v1.8.1

    9/13/2017

    v1.8.1 is a small performance-focused release. It changes how the computed base64 SHA1 digest is post-processed when forming the ETag, replacing a regular expression trim with a substring.

  • v1.8.0

    2/19/2017

    Release v1.8.0 updates the library to generate HTTP ETags using SHA1 instead of MD5. It also refreshes development tooling (lint/CI/benchmarks) and updates documentation and tests to match the new ETag outputs.

    BreakingSecurity
  • v1.7.0

    2/19/2017

    v1.7.0 changes how this package generates ETags, switching non-Stats entity hashing to MD5 only, trimming base64 padding, and including the entity length to mitigate hash length extension concerns. It also updates fs.Stats ETag generation to remove hashing for better stat performance. As a result, the resulting ETag strings differ from v1.6.0 across both strong and weak validators.

    BreakingSecurity
  • v1.6.0

    5/11/2015

    Release v1.6.0 updates the ETag generation logic to better recognize “stats-like” objects, especially in non-standard runtimes. It relaxes the required fields in the stats object and adds a safeguard around the native Stats check, while also updating CI and dev tooling.

  • v1.5.1

    11/20/2014

    Release v1.5.1 primarily bumps the crc dependency to version 3.2.1. The diff also updates project metadata and refreshes README benchmark output values, but there are no direct changes to the library API or implementation shown in this diff.

  • v1.5.0

    10/14/2014

    Release v1.5.0 focuses on improving performance of ETag computation, especially for string inputs and for weak ETags over a 1KB threshold. The code changes adjust how hashes are computed for weak versus strong tags and avoid allocating a UTF-8 buffer for string inputs.

    Breaking
  • v1.4.0

    9/21/2014

    Release v1.4.0 adds support for treating “fake” fs.Stats-like objects as stats when generating ETags, and it expands the supported Node.js runtime to include Node.js 0.6. The core ETag generation behavior remains the same API-wise, but the internal detection logic for when an entity is considered a stats object is now more permissive.

    Features
  • v1.3.1

    9/14/2014

    v1.3.1 is a small update that changes how CRC32 is computed for ETag generation by switching CRC implementations. The release notes only mention the CRC change, while the diff also shows a small adjustment to input type validation messaging and several documentation/benchmark updates.

  • v1.3.0

    8/30/2014

    Release 1.3.0 changes the default behavior of this library's ETag generation so that strings now produce strong ETags (buffers are already strong, fs.Stats remain weak by default). It also improves performance for weak ETags for payloads larger than about 1KB by adjusting the hashing strategy used for “weak” output.

  • v1.2.1

    8/30/2014

    This release updates the CRC32 implementation used by the ETag calculation to use the faster `buffer-crc32` package. The codebase also gains new benchmark tooling and documentation updates, but the release notes only mention the CRC32 switch.

    Breaking