Skip to content

JmilkFan/tinyhttpd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tinyhttpd

  1. 实现了基于 epoll 和非阻塞 I/O 的 TCP Socket。
  2. 实现了 HTTP/1 协议,支持 GET 和 PUT 方式。
  3. 实现了 Perl CGI 应用程序。
  4. 使用了 fork 子进程。
  5. 使用了 pthread 线程处理 Client 请求。

Use Guide

  • 操作系统:CentOS 7
$ yum install perl-core -y
$ perl -e shell -MCPAN
<cpan> install CGI

$ git clone https://github.com/JmilkFan/tinyhttpd
$ cd tinyhttpd
$ make
#or $ make httpd-debug

$ cd tinyhttpd
$ chmod +x htdocs/*.cgi
$ chmod 600 htdocs/index.html

$ ./httpd
$ curl http://localhost:8086/

Documents & Blog

《用 C 语言开发一个轻量级 HTTP 服务器》

About

Tiny HTTP Server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages