Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid copying the whole file into RAM to detect its content type #214

Merged
merged 1 commit into from Sep 5, 2021

Commits on Sep 5, 2021

  1. Avoid copying the whole file into RAM to detect its content type

    request.buildHTTP copies the whole files into RAM to detect their
    content types, but it increases RAM usage if there is a large file.
    Since http.DetectContentType only considers at most the first 512 bytes
    of data, we can avoid copying the whole data.
    
    Signed-off-by: Junpei Kawamoto <kawamoto.junpei@gmail.com>
    jkawamoto committed Sep 5, 2021
    Copy the full SHA
    6a7287f View commit details
    Browse the repository at this point in the history