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 31 Oct 2014, 03:12
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
goingnuts

Joined: 07 Dec 2008
Posts: 782

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  339 Time(s) 
Back to top
View user's profile Send_private_message Visit_website 
goingnuts

Joined: 07 Dec 2008
Posts: 782

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  228 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  246 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:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0431s ][ Queries: 13 (0.0042s) ][ GZIP on ]