CORTEX
All projects

BHTTP-1

PROTOTYPE

A binary, HTTP-like protocol over persistent TCP, written in Go with a spec, server, client and chaos proxy.

Personal project ยท Sep 2026

THE PROBLEM

Learn what HTTP does for you by designing a small binary protocol and making its parser survive hostile input.

HOW IT WORKS

  • A 12-byte frame header (length, type, flags, stream id) with request, response, data and error frames.
  • A reference server (bserve), a client (bcurl), a chaos proxy (bchaos) that splits reads to one byte and injects unknown frames, and independent Python interop clients.

ENGINEERING EVIDENCE

  • Frame length is validated before any allocation, and unknown frame types are skipped by their length. reader.go โ†—
  • Four fuzz targets, and the Go test suite (about 370 test runs) passes.
  • Written spec, wire-format document and an annotated hexdump of a real captured exchange.

WHAT ISN'T DONE

  • Version 1 handles one request at a time: no multiplexing and no TLS.
  • Standard library only; not deployed.

STACK

  • Go
  • Python
  • Docker