TinyHttpd | TinyHttpd是一个运行于Android上轻量且高效的Http服务器组件

 by   yangwencan2002 Java Version: Current License: No License

kandi X-RAY | TinyHttpd Summary

kandi X-RAY | TinyHttpd Summary

TinyHttpd is a Java library. TinyHttpd has no bugs, it has build file available and it has low support. However TinyHttpd has 1 vulnerabilities. You can download it from GitHub.


            kandi-support Support

              TinyHttpd has a low active ecosystem.
              It has 9 star(s) with 5 fork(s). There are 2 watchers for this library.
              It had no major release in the last 6 months.
              TinyHttpd has no issues reported. There are no pull 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 does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              TinyHttpd releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed TinyHttpd and discovered the below as its top functions. This is intended to give you an instant insight into TinyHttpd implemented functionality, and help decide if they suit your requirements.
            • Decodes the request bytes into an HTTP request
            • Decode parameters
            • Parses a GET method
            • Returns the HTTP version for the given HTTP version
            • Initialize the server
            • Get the HMAC SHA1 for a string
            • Encodes a URL
            • Create a full URL
            • Main loop
            • Handle accept
            • Read the request bytes
            • Runs the daemon thread
            • Service with interceptor chain
            • Intercept the request
            • Get the first value of a parameter
            • Checks that the given object is not null or empty
            • Closes the server
            • Returns true if the request is partial
            • Sets the HTTP content length
            • Log a WARN message
            • Performs POST request
            • Intercept the request chain
            • Override this method to respond to a GET
            • Generate the next interceptor chain in the chain
            • Gets the header offset
            • Encode HTTP response
            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


            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



            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


            Directory traversal vulnerability in TinyHTTPD 0.1 .0 allows remote attackers to read or execute arbitrary files via a ".." (dot dot) in the URL.

            Install TinyHttpd

            You can download it from GitHub.
            You can use TinyHttpd like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the TinyHttpd component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .


            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
          • HTTPS


          • CLI

            gh repo clone yangwencan2002/TinyHttpd

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Java Libraries


            by CyC2018


            by Snailclimb


            by MisterBooo


            by spring-projects

            Try Top Libraries by yangwencan2002


            by yangwencan2002Java


            by yangwencan2002Java


            by yangwencan2002Java