Tinyhttpd | lightweight Http Server with less than 500 lines | Runtime Evironment library

 by   EZLippi C Version: Current License: GPL-3.0

kandi X-RAY | Tinyhttpd Summary

kandi X-RAY | Tinyhttpd Summary

Tinyhttpd is a C library typically used in Server, Runtime Evironment applications. Tinyhttpd has no bugs, it has a Strong Copyleft License and it has medium support. However Tinyhttpd has 1 vulnerabilities. You can download it from GitHub.

Tinyhttpd is an ultra-lightweight Http Server with less than 500 lines written by J. David Blackstone in 1999. It is very good for learning and can help us truly understand the essence of server programs. Official website: http://tinyhttpd.sourceforge.net
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              Tinyhttpd has a medium active ecosystem.
              It has 10003 star(s) with 3793 fork(s). There are 310 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 20 open issues and 22 have been closed. On average issues are closed in 128 days. There are 8 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of Tinyhttpd is current.

            kandi-Quality Quality

              Tinyhttpd has no bugs reported.

            kandi-Security Security

              Tinyhttpd has 1 vulnerability issues reported (0 critical, 0 high, 1 medium, 0 low).

            kandi-License License

              Tinyhttpd is licensed under the GPL-3.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              Tinyhttpd releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Tinyhttpd
            Get all kandi verified functions for this library.

            Tinyhttpd Key Features

            No Key Features are available at this moment for Tinyhttpd.

            Tinyhttpd Examples and Code Snippets

            No Code Snippets are available at this moment for Tinyhttpd.

            Community Discussions

            QUESTION

            Why web server should clear away socket receive buffer before sending response?
            Asked 2018-Oct-27 at 09:34

            I am studying a tiny web server, it can receive GET-request from browser and return an html file. The serve_file-function sends response messages to browser, and the get_line-function gets a line from socket buffer. I don't know why must read & discard request headers. I try to comment the two lines and the browser show a connection reset page. I guess the server socket receive buffer is full, but I don't know the specific reason. Could anyone explain it?
            source code

            ...

            ANSWER

            Answered 2018-Oct-27 at 09:34

            The behavior you observed is a standard socket behavior.

            If data received from a peer has not been read by the application and the application calls close on the socket then OS does not do the usual TCP connection finalization. It resets the connection immediately instead finalization. If application really wants gracefully close the connection when there is unread data in the received buffer then it must call shutdown(socket, SHUT_WR) before calling close.

            And why is the socket API implemented that way? Because this handling can avoid dos attacks. If close executes normal TCP session finalization then following attack is possible:

            • A malicious client opens a TCP connection
            • The server accepts the connection and starts receiving data
            • The client sends a continuous stream of let say random data
            • The server quickly detects that received data is wrong and calls close on the socket.
            • close just sends a FIN and then waits for the peer close. Server resources remain allocated because normal FIN just close the direction towards the client. The client still may send data and the recv buffer would not be freed.

            But when the close initiates connection reset then resources related to this TCP connection is freed immediately. A dos attack is then a bit more complicated.

            See https://www.spinics.net/lists/linux-c-programming/msg01345.html for more details.

            Source https://stackoverflow.com/questions/53005266

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install Tinyhttpd

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/EZLippi/Tinyhttpd.git

          • CLI

            gh repo clone EZLippi/Tinyhttpd

          • sshUrl

            git@github.com:EZLippi/Tinyhttpd.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link