thttpd - tiny/turbo/throttling HTTP server.
This is a static build. 134K for the server itself. Included small examples of web-pages, cgi-scripts and example of password protected directory tree. Fast and light weight. Relatively easy to configure. Init-script included so server will start at boot - to disable this move/delete /etc/init.d/rc.thttpd.
Ideal for small embedded servers...
Read the manual/notes for further configuring like chroot-running, throttling or multiple domains.
thttpd-2.25b-i486-static build - tiny webserver
thttpd-2.25b-i486-static build - tiny webserver
- Attachments
-
- thttpd-2.25b-i486-static.tar.gz
- Static build of thttpd
- (113.42 KiB) Downloaded 624 times
I have been working a little further on the script CGI and ran into the following problem:
File uploaded to the web server via the POST command from a web-page can be captured at the server using the "cat" command. The result is a file containing additional lines added by the server. Example content after upload:
the server adds 2 new lines at the bottom
A script can afterwards remove the 4 header lines and the two bottom lines.
MD5sum and diff shows that text/xpm-files are identical but if binary files are uploaded it fails.
Anyone have any idea to overcome this? It would be very much appreciated!
Attached 4 files: 2 text files before and after upload and 2 binary files before and after upload - if you feel like testing...
So main problem is to modify the two uploaded files to become identical with the originals - knowing that server did put 4 lines in the top and 2 lines in the bottom...
Update: Another solution is to use ccgi: Attached example based on cgic205-lib using a static compiled ccgi (29K) to perform the upload (embedded in a sh-script cgi-page).
File uploaded to the web server via the POST command from a web-page can be captured at the server using the "cat" command. The result is a file containing additional lines added by the server. Example content after upload:
Code: Select all
-----------------------------590439502404540843565813045
Content-Disposition: form-data; name="upfile"; filename="abiword_16.xpm"
Content-Type: image/x-xpixmap
here comes the original file content
and here it ends with an empty new line
-----------------------------590439502404540843565813045--
A script can afterwards remove the 4 header lines and the two bottom lines.
MD5sum and diff shows that text/xpm-files are identical but if binary files are uploaded it fails.
Anyone have any idea to overcome this? It would be very much appreciated!
Attached 4 files: 2 text files before and after upload and 2 binary files before and after upload - if you feel like testing...
So main problem is to modify the two uploaded files to become identical with the originals - knowing that server did put 4 lines in the top and 2 lines in the bottom...
Update: Another solution is to use ccgi: Attached example based on cgic205-lib using a static compiled ccgi (29K) to perform the upload (embedded in a sh-script cgi-page).
- Attachments
-
- file_upload_ccgi.tar.gz
- ccgi example for fileupload
- (15.71 KiB) Downloaded 524 times
-
- example_serverfiles.tar.gz
- 4 files - 2 original and the same two after upload without any modification.
- (1.24 KiB) Downloaded 506 times