remote-curl: Fix Accept header for smart HTTP connections
We actually expect to see an application/x-git-upload-pack-result but we lied and said we Accept *-response. This was a typo on my part when I was writing the code. Fortunately the wrong Accept header had no real impact, as the deployed git-http-backend servers were not testing the Accept header before they returned their content. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Shawn O. Pearce committed
Jan 12, 2010 at 09:54 UTC
8efa5f629efb9a8af48619ee90dee02343e0f19d
2 files changed
+2
-2
remote-curl.c
+1
-1
@@ -480,7 +480,7 @@ static int rpc_service(struct rpc_state *rpc, struct discovery *heads)
480
strbuf_addf(&buf, "Content-Type: application/x-%s-request", svc);
481
rpc->hdr_content_type = strbuf_detach(&buf, NULL);
482
483
- strbuf_addf(&buf, "Accept: application/x-%s-response", svc);
483
+ strbuf_addf(&buf, "Accept: application/x-%s-result", svc);
484
rpc->hdr_accept = strbuf_detach(&buf, NULL);
485
486
while (!err) {
t/t5551-http-fetch.sh
+1
-1
@@ -38,7 +38,7 @@ cat >exp <<EOF
38
> POST /smart/repo.git/git-upload-pack HTTP/1.1
39
> Accept-Encoding: deflate, gzip
40
> Content-Type: application/x-git-upload-pack-request
41
-> Accept: application/x-git-upload-pack-response
41
+> Accept: application/x-git-upload-pack-result
42
> Content-Length: xxx
43
< HTTP/1.1 200 OK
44
< Pragma: no-cache