Giter Site home page Giter Site logo

Comments (3)

mtrudel avatar mtrudel commented on June 18, 2024 1

I actually have a few things on the backlog to refine this behaviour (mostly stemming from this issue).

  • If a content-length header is set when a user called send_chunked/2, just send a non transfer-encoded response body out as bare bytes as the user calls chunk/2 (this is already what we do for HTTP/2, which doesn't do transfer-encoding)
  • I have to verify that we're doing the right thing with sending a content-length header for HEAD/304 (where we MAY send it) and 204 (where we MUST NOT send it)

from bandit.

danschultzer avatar danschultzer commented on June 18, 2024

Oh I get it now. The body is not returned for HEAD request as expected. I assume the body is necessary to set to calculate the right length depending on the compression?

from bandit.

danschultzer avatar danschultzer commented on June 18, 2024

Ok, I figured out the issue I had. Bandit does need the body to calculate length, can't just set it, makes sense. Also my HTTP client was accepting gzip, Bandit responded accordingly when I was simulating streaming from S3. Setting http_options: [compress: false]] makes this work like AWS. All good, got confused how this was supposed to function 😄

from bandit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.