Code Monkey home page Code Monkey logo

Comments (2)

kazuho avatar kazuho commented on July 29, 2024

We could do that. The reason it has not been done is because it is not a hot path.

In almost all cases, a HTTP client will send the entire request at once. The moment that is_complete is called is when a client sends either a HTTP reqquest with a very long header or does a Slowloris attack.

In either case, other parts (e.g. syscall or parse_headers) will take more time than looking for \r?\n\r?\n.

from picohttpparser.

vinniefalco avatar vinniefalco commented on July 29, 2024

Yes, I see now, thanks for explaining it. I was under the impression that the parser didn't do anything until it detected the final \r\n\r\n sequence (i.e. is_complete). I did not realize that is_complete is only called after the parse fails to find the end of the message once (is my understanding correct?)

from picohttpparser.

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.