Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 01 Jul 2015, 08:08
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Browsers and Internet
thttpd-2.25b-i486-static build - tiny webserver
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message

Joined: 07 Dec 2008
Posts: 811

PostPosted: Fri 29 Oct 2010, 17:16    Post_subject:  thttpd-2.25b-i486-static build - tiny webserver  

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.
Description  Static build of thttpd

Filename  thttpd-2.25b-i486-static.tar.gz 
Filesize  113.42 KB 
Downloaded  376 Time(s) 
Back to top
View user's profile Send_private_message Visit_website 

Joined: 07 Dec 2008
Posts: 811

PostPosted: Mon 07 Mar 2011, 15:40    Post_subject:    

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:

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


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).
Description  ccgi example for fileupload

Filename  file_upload_ccgi.tar.gz 
Filesize  15.71 KB 
Downloaded  259 Time(s) 
Description  4 files - 2 original and the same two after upload without any modification.

Filename  example_serverfiles.tar.gz 
Filesize  1.24 KB 
Downloaded  274 Time(s) 
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Browsers and Internet
Jump to:  

You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0476s ][ Queries: 12 (0.0075s) ][ GZIP on ]