[PATCH v3 0/4] Unify pkt-line error handling and refactor smart-http
- From
Josh Steadmon <steadmon@google.com>
- Date
- Dec 12, 2018, 00:25 UTC
- Message-ID
- <cover.1544572142.git.steadmon@google.com>
- In-Reply-To
- <20181116084427.GA31493@sigill.intra.peff.net>
This is a reroll of js/smart-http-detect-remote-error that also includes a fixed version of ms/proto-err-packet-anywhere [1].
The first patch clarifies the use of ERR messages in the pkt-line protocol and unifies error handling in pkt-line.c
The second patch refactors smart-http discovery in remote-curl.c. Among other improvements, it makes more use of the pkt-line functions, which allows us to catch remote errors that were previously ignored.
The third patch makes the version check in remote-curl more strict.
The final patch adds a test to verify that the fix in patch #2 does actually catch remote HTTP errors.
[1]: https://public-inbox.org/git/20181127045301.103807-1-masayasuzuki@google.com/
Jeff King (2): remote-curl: refactor smart-http discovery remote-curl: tighten "version 2" check for smart-http
Josh Steadmon (1): lib-httpd, t5551: check server-side HTTP errors
Masaya Suzuki (1): pack-protocol.txt: accept error packets in any context
Documentation/technical/pack-protocol.txt | 20 ++--- builtin/archive.c | 2 - connect.c | 3 - fetch-pack.c | 2 - pkt-line.c | 4 + remote-curl.c | 93 ++++++++++++++--------- t/lib-httpd.sh | 1 + t/lib-httpd/apache.conf | 4 + t/lib-httpd/error-smart-http.sh | 3 + t/t5551-http-fetch-smart.sh | 5 ++ t/t5703-upload-pack-ref-in-want.sh | 4 +- 11 files changed, 89 insertions(+), 52 deletions(-) create mode 100644 t/lib-httpd/error-smart-http.sh
-- 2.20.0.rc2.403.gdbc3b29805-goog