• Sami Hiltunen's avatar
    delay PostUploadPack response until request is fully read · 2fe99f66
    Sami Hiltunen authored
    Git and Gitaly stream upload-pack response data as soon as it is
    available. Some HTTP clients do not support the response being streamed
    back while the server is still reading from the request body. To avoid
    this, the request was buffered in to a temporary file before passing it
    to Gitaly for handling. The buffer had a maximum size of 10MB, which is
    now reached by requests to large repositories. These requests were then
    truncated, causing Git to fail.
    
    This commit fixes the problem by removing the request buffering and the
    maximum size. Instead, the response is buffered in to a temporary file
    until the request body is fully read, thus avoiding the problem of
    streaming the request and the response simultaneously.
    2fe99f66
upload-pack_test.go 2.16 KB