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 Tue 27 Jun 2017, 01:18
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Suggestions
Filehandler Modification for handling urls
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message
Stingray

Joined: 12 Sep 2008
Posts: 11

PostPosted: Sat 27 Feb 2010, 14:00    Post subject:  Filehandler Modification for handling urls
Subject description: the standard puppy filehandler needs update
 

the original /usr/local/bin/defaulthandler need some changes to handle URL's. at the moment the handler checks the file extensions and fails on extensions like .net or .pl, .cgi or .php ... there are many.

i would suggest to insert on top those lines to check if a parameter starts with "http://" and then starts the default html viewer:
Code:

###########################################################
# just add this handler for "http://" type requests
# this will handle correct extensions like .pl or .php,
# .cgi and others
###########################################################
URLFILE=$1
if  [ "`echo -n "$URLFILE" | head -c 7`" = "http://" ];then
/usr/local/bin/defaulthtmlviewer "$1"
exit
fi
###########################################################
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Suggestions
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.0277s ][ Queries: 11 (0.0045s) ][ GZIP on ]