summaryrefslogtreecommitdiff
path: root/http-backend.c
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2009-10-30 17:47:47 -0700
committerJunio C Hamano <gitster@pobox.com>2009-11-04 17:58:16 -0800
commit7da4e2280ccaf5ecb357f7cb2b81d62f78f00f9e (patch)
tree413a35aa4c959f21bb3c2357e365990eb14866c8 /http-backend.c
parent024bb1256627219671a0924b195582b6e049ca87 (diff)
downloadgit-7da4e2280ccaf5ecb357f7cb2b81d62f78f00f9e.tar.gz
test smart http fetch and push
The top level directory "/smart/" of the test Apache server is mapped through our git-http-backend CGI, but uses the same underlying repository space as the server's document root. This is the most simple installation possible. Server logs are checked to verify the client has accessed only the smart URLs during the test. During fetch testing the headers are also logged from libcurl to ensure we are making a reasonably sane HTTP request, and getting back reasonably sane response headers from the CGI. When validating the request headers used during smart fetch we munge away the actual Content-Length and replace it with the placeholder "xxx". This avoids unnecessary varability in the test caused by an unrelated change in the requested capabilities in the first want line of the request. However, we still want to look for and verify that Content-Length was used, because smaller payloads should be using Content-Length and not "Transfer-Encoding: chunked". When validating the server response headers we must discard both Content-Length and Transfer-Encoding, as Apache2 can use either format to return our response. During development of this test I observed Apache returning both forms, depending on when the processes got CPU time. If our CGI returned the pack data quickly, Apache just buffered the whole thing and returned a Content-Length. If our CGI took just a bit too long to complete, Apache flushed its buffer and instead used "Transfer-Encoding: chunked". Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http-backend.c')
0 files changed, 0 insertions, 0 deletions