Giter Site home page Giter Site logo

gideonz / microhttpserver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from starnight/microhttpserver

1.0 0.0 3.0 656 KB

Simple HTTP Server which implements partial HTTP 1.1

License: BSD 3-Clause "New" or "Revised" License

Python 5.41% C 87.87% Makefile 1.66% HTML 0.24% C++ 4.83%

microhttpserver's Introduction

Micro HTTP Server

About this fork

This once was the basis for the HTTP Daemon for the Ultimate related projects. However, it quickly showed that it was buggy and not capable of serving files that were larger than the pre-allocated response buffer. This version has been greatly improved. Bugs have been fixed. In addition, it can now serve larger files and also has gotten support for parsing multipart mime posts in a streaming way. Is it still really simple? Probably not. It still runs on a micro controller, though.

The route mechanism has been replaced by a RESTful API parser, as designed by Johan Smolinski.

Original text follows

It is a really simple HTTP server for prototyping.

One of the major purpose is that it can be ported on an embedded system (including micro controller unit level).

For writing Micro HTTP Server, the developer has studied eserv and Tiny HTTPd.

Demo

Get the code git clone https://github.com/starnight/MicroHttpServer.git.

Python Version

It will need Python 3.2 or above.

cd py-version
python3 main.py

Open your web browser and access the URL: http://localhost:8000

C Version

It will need make and GCC for building.

cd c-version
make
./microhttpserver

Open your web browser and access the URL: http://localhost:8001

Directories and Files

  • autotest/: Place the scripts or programs for test automation.
    • client.py: The test automation program writen in Python3 tests the Micro HTTP Server.
  • py-version/: Place the Python Version Micro HTTP Server.
    • main.py: The entry point of Python Version Micro HTTP Server example.
    • app.py: The web application of Python Version Micro HTTP Server example.
    • lib/: Place the Python Version Micro HTTP Server core library.
      • server.py: The Python Version Micro HTTP Server.
      • middleware.py: The Python Version Micro HTTP Server middleware.
      • __init__.py: Needed when server.py and middleware.py are imported by other Python programs located in other directories.
    • static/: Place the static files: HTML, JS, Images ... , which could be access directly.
  • c-version/: Place the C Version Micro HTTP Server.
    • main.c: The entry point of C Version Micro HTTP Server example.
    • app.h: The web application header file of C Version Micro HTTP Server example.
    • app.c: The web application source file of C Version Micro HTTP Server example.
    • lib/: Place the C Version Micro HTTP Server core library.
      • server.h: The header file of C Version Micro HTTP Server.
      • server.c: The source file of C Version Micro HTTP Server.
      • middleware.h: The header file of C Version Micro HTTP Server middleware.
      • middleware.c: The source file of C Version Micro HTTP Server middleware.
    • static/: Place the static files: HTML, JS, Images ... , which could be access directly.
    • Makefile: The makefile of this C Version Micro HTTP Server example.
  • FreeRTOS/: Place the example of Micro HTTP Server ported on FreeRTOS.
  • .travis.yml: The continuous integration build script for Travis CI.
  • LICENSE.md: The BSD license file.
  • README.md: This read me file.

Reference

License

Micro HTTP Server's code uses the BSD license, see our LICENSE.md file.

microhttpserver's People

Contributors

gideonz avatar johansmolinski avatar starnight avatar

Stargazers

 avatar

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.