Content Integrity Test Page

A comprehensive HTML page for testing content delivery integrity through service bindings

Debug Mode Active: This page is designed to test content integrity through Worker service bindings.
0
Page Loads
256
Hash Bits
SHA
Algorithm
OK
Status

Test Parameters

  • Origin fetch with caching enabled
  • Service binding chain: worker-1 → worker-2
  • Content-Type: text/html; charset=utf-8
  • Cache-Control: public, max-age=3600
  • Compression: gzip/br supported

Verification Checks

  • SHA-256 content hash validation
  • Content-Length header verification
  • Transfer encoding integrity
  • Character encoding preservation
  • Binary data boundary handling

Known Edge Cases

  • Large response body handling
  • Chunked transfer encoding
  • Response streaming interruption
  • Cache hit vs miss differences
  • Concurrent request handling
Test ID Description Expected Result Status
INT-001 Basic content hash verification Hash matches expected value Pending
INT-002 Content-Length accuracy Byte count matches header Pending
INT-003 UTF-8 character preservation Special chars intact: áéíóúñü Pending
INT-004 HTML entity handling < > & " preserved Pending
INT-005 Script tag integrity JavaScript executes correctly Pending

Sample Form (For Complexity)

// Worker-2 Hash Verification Logic async function verifyContentIntegrity(response) { const expectedHash = 'EXPECTED_HASH_PLACEHOLDER'; const body = await response.clone().arrayBuffer(); const hashBuffer = await crypto.subtle.digest('SHA-256', body); const hashArray = Array.from(new Uint8Array(hashBuffer)); const actualHash = hashArray.map(b => b.toString(16).padStart(2, '0')).join(''); if (actualHash !== expectedHash) { console.error(`Hash mismatch! Expected: ${expectedHash}, Got: ${actualHash}`); return { valid: false, expected: expectedHash, actual: actualHash }; } return { valid: true }; }
What is content integrity verification? +

Content integrity verification ensures that data transmitted between services arrives exactly as expected, without corruption, truncation, or modification. This is crucial when using service bindings where responses pass through multiple workers.

How does SHA-256 hashing work? +

SHA-256 produces a 256-bit (32-byte) hash value, typically rendered as a 64-character hexadecimal string. Even a single bit change in the input produces a completely different hash, making it ideal for integrity verification.

What causes content corruption? +

Content corruption can occur due to: improper stream handling, premature connection closure, encoding/decoding errors, buffer overflow, race conditions in concurrent processing, or bugs in response body transformation.

Progress Simulation

Download Progress:

Integrity Check Result

Awaiting verification...