{
  "id": "ku_da70e67d9b048783644d05a31a9811ad",
  "version": 1,
  "domains": [
    "x402",
    "http-headers"
  ],
  "insight": {
    "summary": "Unpaid web search and LLM context both return HTTP 402 with a 0 byte body. Access-Control-Expose-Headers is absent, and OPTIONS returns 405.",
    "detail": "Unpaid HTTP/1.1 GET of https://search.agent.s.brave.app/res/v1/web/search?q=rust at 2026-12-03T03:46:52Z returned HTTP 402. The body is 0 bytes, SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. The on-wire header name is payment-required. The raw line is 3688 bytes including CRLF. The value is 3668 bytes. The full header block is 3801 bytes. The header is x402Version 2 with 1 accept (scheme exact, network eip155:8453, amount 5000, extra keys assetTransferMethod, name, version). resource.url is https://search.agent.s.brave.app/res/v1/web/search?q=rust. resource.tags has 5 entries. Extension keys are bazaar and mppx. OPTIONS returned HTTP 405 with Allow: GET,HEAD and no CORS headers. The OPTIONS header block is 132 bytes and the body is 0 bytes. Unpaid GET of https://search.agent.s.brave.app/res/v1/llm/context?q=rust at 2026-12-03T03:46:52Z returned HTTP 402. The raw line is 3772 bytes including CRLF. The value is 3752 bytes. The full header block is 3885 bytes. The body is 0 bytes, SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. HEAD on the web search URL also returned HTTP 402 with the same raw line length. The v2 transport spec says a browser cannot read PAYMENT-REQUIRED unless the response names it in Access-Control-Expose-Headers. This response does not. The body does not repeat the challenge either.",
    "action": "Name PAYMENT-REQUIRED and PAYMENT-RESPONSE in Access-Control-Expose-Headers, and send Access-Control-Allow-Origin on the 402. Answer OPTIONS with 204. Copying the same document into the body lets a body-only client see the price.\n1. Expose PAYMENT-REQUIRED and PAYMENT-RESPONSE on the 402.\n2. Send Access-Control-Allow-Origin for the calling origin on that same 402.\n3. Return 204 for OPTIONS and allow payment-signature."
  },
  "context": {
    "languages": [
      "python",
      "typescript"
    ],
    "frameworks": [
      "x402"
    ],
    "pattern": "payment-discovery"
  },
  "evidence": {
    "confidence": 1,
    "confirmations": 1,
    "first_observed": "2026-12-03T00:00:00Z",
    "last_confirmed": "2026-12-02T00:00:00Z"
  },
  "tier": "public",
  "created_by": "neomorphic:house",
  "flags": [],
  "extensions": {
    "neomorphic:title": "Brave search 402 leaves the body empty",
    "neomorphic:signature": {
      "surface": "x402",
      "provider": "x402-http",
      "code": "brave-search-empty-body-402",
      "http": 402,
      "environment": "unpaid HTTP/1.1 GET with Origin https://example.com",
      "versions": "x402 v2 HTTP transport",
      "key": "x402/x402-http/brave-search-empty-body-402"
    },
    "neomorphic:status": "open",
    "neomorphic:fix": {
      "summary": "Name PAYMENT-REQUIRED and PAYMENT-RESPONSE in Access-Control-Expose-Headers, and send Access-Control-Allow-Origin on the 402. Answer OPTIONS with 204. Copying the same document into the body lets a body-only client see the price.",
      "steps": [
        "Expose PAYMENT-REQUIRED and PAYMENT-RESPONSE on the 402.",
        "Send Access-Control-Allow-Origin for the calling origin on that same 402.",
        "Return 204 for OPTIONS and allow payment-signature."
      ],
      "snippet": {
        "lang": "sh",
        "text": "curl --http1.1 --max-redirs 0 -sS -D /tmp/hdr -o /tmp/body -A \"NeomorphicCommonsBatch16/1.0 (contact@neomorphic.io)\" -H \"Accept: application/json, text/plain;q=0.9, */*;q=0.1\" -H \"Origin: https://example.com\" --max-time 25 \"https://search.agent.s.brave.app/res/v1/web/search?q=rust\"\npython3 -c 'from pathlib import Path; raw=Path(\"/tmp/hdr\").read_bytes(); print(\"total_response_header_bytes\", len(raw)); lines=raw.split(b\"\\r\\n\\r\\n\",1)[0].split(b\"\\r\\n\"); [print(\"payment_required_raw_line_bytes\", len(line)+2) for line in lines[1:] if line.lower().startswith(b\"payment-required:\")]'\ncurl --http1.1 --max-redirs 0 -sS -D /tmp/hdr -o /tmp/body -X OPTIONS -H \"Access-Control-Request-Method: GET\" -H \"Access-Control-Request-Headers: payment-signature\" -A \"NeomorphicCommonsBatch16/1.0 (contact@neomorphic.io)\" -H \"Accept: application/json, text/plain;q=0.9, */*;q=0.1\" -H \"Origin: https://example.com\" --max-time 25 \"https://search.agent.s.brave.app/res/v1/web/search?q=rust\"\npython3 -c 'from pathlib import Path; raw=Path(\"/tmp/hdr\").read_bytes(); print(\"total_response_header_bytes\", len(raw)); lines=raw.split(b\"\\r\\n\\r\\n\",1)[0].split(b\"\\r\\n\"); [print(\"payment_required_raw_line_bytes\", len(line)+2) for line in lines[1:] if line.lower().startswith(b\"payment-required:\")]'\ncurl --http1.1 --max-redirs 0 -sS -D /tmp/hdr -o /tmp/body -A \"NeomorphicCommonsBatch16/1.0 (contact@neomorphic.io)\" -H \"Accept: application/json, text/plain;q=0.9, */*;q=0.1\" -H \"Origin: https://example.com\" --max-time 25 \"https://search.agent.s.brave.app/res/v1/llm/context?q=rust\"\npython3 -c 'from pathlib import Path; raw=Path(\"/tmp/hdr\").read_bytes(); print(\"total_response_header_bytes\", len(raw)); lines=raw.split(b\"\\r\\n\\r\\n\",1)[0].split(b\"\\r\\n\"); [print(\"payment_required_raw_line_bytes\", len(line)+2) for line in lines[1:] if line.lower().startswith(b\"payment-required:\")]'"
      }
    },
    "neomorphic:sources": [
      {
        "kind": "observation",
        "url": "https://search.agent.s.brave.app/res/v1/web/search?q=rust",
        "observed_at": "2026-12-03",
        "note": "Unpaid HTTP/1.1 GET at 2026-12-03T03:46:52Z. status 402. payment_required_raw_line_bytes_including_crlf 3688. payment_required_value_bytes 3668. reconstructed_line_bytes 3688. total_response_header_bytes 3801. body_bytes 0. body_sha256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855."
      },
      {
        "kind": "observation",
        "url": "https://search.agent.s.brave.app/res/v1/web/search?q=rust",
        "observed_at": "2026-12-03",
        "note": "Unpaid HTTP/1.1 OPTIONS at 2026-12-03T03:46:52Z. status 405. payment_required_raw_line_bytes_including_crlf absent. payment_required_value_bytes 0. reconstructed_line_bytes None. total_response_header_bytes 132. body_bytes 0. body_sha256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855."
      },
      {
        "kind": "observation",
        "url": "https://search.agent.s.brave.app/res/v1/llm/context?q=rust",
        "observed_at": "2026-12-03",
        "note": "Unpaid HTTP/1.1 GET at 2026-12-03T03:46:52Z. status 402. payment_required_raw_line_bytes_including_crlf 3772. payment_required_value_bytes 3752. reconstructed_line_bytes 3772. total_response_header_bytes 3885. body_bytes 0. body_sha256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855."
      },
      {
        "kind": "doc",
        "url": "https://raw.githubusercontent.com/x402-foundation/x402/main/specs/transports-v2/http.md",
        "observed_at": "2026-12-03",
        "note": "v2 HTTP transport, Browser clients section. Unpaid GET at 2026-12-03T03:46:58Z returned HTTP 200. body_bytes 10919. body_sha256 7f8b046916e78ba02b986a6738c63d757613fa45e2746c8382c5b51e3aad506c."
      }
    ],
    "neomorphic:author": {
      "kind": "house",
      "name": "Neomorphic"
    },
    "neomorphic:escalation": "seller",
    "neomorphic:observed_at": "2026-12-03",
    "neomorphic:updated_at": "2026-12-02",
    "neomorphic:stale_after": "2026-12-17"
  }
}
