Coder Social home page Coder Social logo

forwrj / big-http Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yellowmax2001/big-http

0.0 0.0 0.0 4.26 MB

A simple http server, support cgi and formal html file. Based on Arm-Linux

License: GNU General Public License v3.0

Makefile 0.73% C 28.16% HTML 71.01% Shell 0.11%

big-http's Introduction

这是一个简单的 http 服务器,用 C 语言编写,基于嵌入式 linux
目前支持 html,cgi
支持图片,音乐,视频等多媒体文件

还有很多不足,有待改进

文件说明:
    format     /* 与文件格式有关 */
    include    /* 各个头文件 */
    interface  /* 字符处理接口,相应客户端接口 */
    system     /* 链表操作 */
    big-http.c /* 包含 main 函数 */
    big-http   /* 用 arm-linux-gcc 编译出来的可执行文件 */
    www        /* 测试用的文件 */
    
music.html    /* 媒体文件测试 */
upload.html   /* 上传文件测试 */
script.cgi    /* cgi 脚本文件测试 */
test.cgi      /* 二进制可执行文件测试 */
    
测试:
1. 选定编译工具,PC 机就选择 gcc,开发板就选择 arm-linux-gcc。在根目录的 Makefile 第一行修改
2. make
3. 把 www 目录里面的 cgi 文件重新用对应的编译工具编译一遍
4. 执行 big-http 
5. 在浏览器中输入服务器地址即可看到首页

使用上的不足:
返回给客户端的报文头没有时间
没有 log 数据,只有打印(打印可以关掉,在 config.h 里面更改宏定义)
没有可更改的配置文件,只能在源程序上面改动

big-http's People

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.