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 Fri 28 Nov 2014, 14:18
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 [2 Posts]  
Author Message
goingnuts

Joined: 07 Dec 2008
Posts: 783

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.
thttpd-2.25b-i486-static.tar.gz
Description  Static build of thttpd
gz

 Download 
Filename  thttpd-2.25b-i486-static.tar.gz 
Filesize  113.42 KB 
Downloaded  343 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
goingnuts

Joined: 07 Dec 2008
Posts: 783

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:
Code:

-----------------------------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--


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_upload_ccgi.tar.gz
Description  ccgi example for fileupload
gz

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

 Download 
Filename  example_serverfiles.tar.gz 
Filesize  1.24 KB 
Downloaded  250 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
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 post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


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