Thread: HTTPd
View Single Post
Old 01-31-2004, 05:46 PM  
darkone's Avatar
Join Date: Dec 2001
Posts: 2,230
Default HTTPd

As promised, I'm now working on the httpd part of daemon So far daemon consists of ~200lines of code, which do following:

0) Handle SSL handshake
1) Determinate HTTP request type (GET, PUT, HEAD, POST)
2) Read http meta-data from header
3) Verify that requested file is within selected root directory
3x) If requested path points to a directory, find first index file from cached db
4) Redirect process to file handlers based on extension
a-4) Create simple handler for ordinary files (.html/.html/.jpg/...)
a-5) Add 'If-Modified-Since' support
a-6) Memory caching for small files
b-4) Finalize php handler
b-5) ... (it works already, but doesn't support POST/PUT yet)
b-6) ...
b-7) Yeap, it's a lot of work
b-8) Add ioftpd specific commands to php
b-9) Add more commands...
b-10) ???

To do:

c-4) Write simple TCL Handler

c-5) CGI handler
c-6) ...
c-7) ...
c-8) This one will take for ages to write

x) Add error messages


I will try to keep this thread up to date. If you have experience in writing _modules_ for php, I could use your help. (adding ioftpd specific commands to php)
darkone is offline   Reply With Quote