IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6583


Ignore:
Timestamp:
Mar 14, 2006, 12:40:15 PM (20 years ago)
Author:
jhoblitt
Message:

change http URI validation to allow relative paths (e.g. 'localhost')

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataStore/lib/DataStore/Record.pm

    r6502 r6583  
    11# Copyright (C) 2006  Joshua Hoblitt
    22#
    3 # $Id: Record.pm,v 1.3 2006-02-28 03:44:32 jhoblitt Exp $
     3# $Id: Record.pm,v 1.4 2006-03-14 22:40:15 jhoblitt Exp $
    44
    55package DataStore::Record;
     
    1414
    1515use Carp qw( carp croak );
    16 use Data::Validate::URI qw( is_http_uri );
     16use Data::Validate::URI qw( is_uri );
    1717use Params::Validate qw( validate_with validate SCALAR );
    1818
     
    6060                type        => SCALAR,
    6161                callbacks   => {
    62                     'is valid http uri' => sub { is_http_uri($_[0]) },
     62                    'is valid http uri' =>
     63                        sub { is_uri($_[0]) and $_[0] =~ /^http:/ },
    6364                },
    6465                default =>  'http://example.org/',
Note: See TracChangeset for help on using the changeset viewer.