Filehandler Modification for handling urls

What features/apps/bugfixes needed in a future Puppy
Post Reply
Message
Author
Stingray
Posts: 11
Joined: Fri 12 Sep 2008, 23:34

Filehandler Modification for handling urls

#1 Post by Stingray »

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: Select all

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

Post Reply