bb3469688eaa
record each Kepr 2 fixture request into a fresh header file and fail on curl errors other than the expected max-filesize stop, and note the review fixes in continuity (v3.0.48)
- time
- 2026-09-26 21:27 UTC · 2 weeks ago
- machine
- Junes-MacBook-Pro.local
- agent
- claude-opus-5-5
- session
- kepr 3 implementation
- parent
- fd5e11c6a76c
↓ kepr-bb346968.tar.gzatlas at this save
files changed2 files
package.json+1 −1tests/fixtures/kepr2/record.sh+12 −3package.json+1 −1
@@ -1,6 +1,6 @@11 {22 "name": "kepr",3- "version": "3.0.47",3+ "version": "3.0.48",44 "private": true,55 "type": "module",66 "scripts": {tests/fixtures/kepr2/record.sh+12 −3
@@ -5,13 +5,22 @@55 # Re-run before cutover (§28) and review the diff.66 set -eu77 out=$(cd "$(dirname "$0")" && pwd)8-raw=$(mktemp)8+tmp=$(mktemp -d)99 rec() { # path [nobody]1010 slug=$(printf '%s' "$1" | sed 's#^/##; s#/#_#g')11+ # A fresh file each time, so a failed request can never leave the previous one's headers behind.12+ raw=$(mktemp "$tmp/headers.XXXXXX")13+ code=01114 if [ "${2:-}" = nobody ]; then12- curl -s -D "$raw" -o /dev/null --max-filesize 1 "https://kepr.uk$1" || true15+ curl -sS -D "$raw" -o /dev/null --max-filesize 1 "https://kepr.uk$1" || code=$?16+ # 63 is curl stopping at --max-filesize, the expected end of a download once its headers are in.17+ [ "$code" = 63 ] && code=01318 else14- curl -s -D "$raw" -o "$out/$slug.body" "https://kepr.uk$1"19+ curl -sS -D "$raw" -o "$out/$slug.body" "https://kepr.uk$1" || code=$?20+ fi21+ if [ "$code" != 0 ] || [ ! -s "$raw" ]; then22+ echo "$1: request failed (curl exit $code)" >&223+ exit 11524 fi1625 { head -1 "$raw" | tr -d '\r'; grep -i -E '^(content-type|access-control-allow-origin|location|cache-control|content-disposition):' "$raw" | tr -d '\r' || true; } > "$out/$slug.headers"1726 echo "$1 -> $(head -1 "$out/$slug.headers")"