upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/reference/configuration.md
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-01-27 19:43:41 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-01-27 20:38:25 +0000
commit3a7fa1d1288c28eae0ee58b4c448c672ec3b69c2 (patch)
tree13afc5d8abeb0a358701ede483d6ec4a7485c9f4 /docs/reference/configuration.md
parent10eab82164bb91236f2afa6b7919d0710609ba7f (diff)
fix: return HTTP 200 with ERR pkt-line for git protocol errors
Previously, all git upload-pack/receive-pack failures returned HTTP 500, but the git smart HTTP protocol requires protocol-level errors (like "not our ref") to be returned as HTTP 200 OK with an ERR pkt-line in the response body. Changes: - Add build_git_protocol_error_response() to create HTTP 200 responses with properly formatted ERR pkt-line ("ERR <message>\n") - Add is_git_protocol_error() to detect protocol errors (exit code 128 with stderr content) vs transport errors - Update handle_upload_pack() and handle_receive_pack() to return protocol errors as HTTP 200 with ERR pkt-line - Keep HTTP 500 for actual transport errors (spawn failures, I/O errors, signals) This allows git clients to properly parse and display protocol error messages instead of seeing generic HTTP 500 errors.
Diffstat (limited to 'docs/reference/configuration.md')
0 files changed, 0 insertions, 0 deletions