From: Chris W. <la...@us...> - 2004-11-27 21:19:17
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29019/lib/OpenInteract2 Modified Files: URL.pm Log Message: don't escape or add contextualization to URLs passed to create() that begin with an 'http:' Index: URL.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/URL.pm,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** URL.pm 25 Nov 2004 03:51:44 -0000 1.27 --- URL.pm 27 Nov 2004 18:27:33 -0000 1.28 *************** *** 96,101 **** } $log->is_debug && ! $log->debug( "Creating deployment URL from '$url_base' ", ! "and params '$param_info'" ); return $class->_create_deployment( DEPLOY_URL, $url_base, $params, $do_not_escape ); --- 96,101 ---- } $log->is_debug && ! $log->debug( "Creating deployment URL from '$url_base' ", ! "and params '$param_info'" ); return $class->_create_deployment( DEPLOY_URL, $url_base, $params, $do_not_escape ); *************** *** 119,127 **** sub _create_deployment { my ( $class, $deploy_under, $url_base, $params, $do_not_escape ) = @_; ! unless ( $do_not_escape ) { ! $url_base = _url_escape( $url_base ); ! } ! if ( $deploy_under ) { ! $url_base = join( '', $deploy_under, $url_base ); } $params ||= {}; --- 119,133 ---- sub _create_deployment { my ( $class, $deploy_under, $url_base, $params, $do_not_escape ) = @_; ! my ( $is_absolute ) = $url_base =~ /^\s*http:/; ! ! # Absolute URLs don't get touched, so the escaping + ! # contextualization doesn't get done to them ! unless ( $is_absolute ) { ! unless ( $do_not_escape ) { ! $url_base = _url_escape( $url_base ); ! } ! if ( $deploy_under ) { ! $url_base = join( '', $deploy_under, $url_base ); ! } } $params ||= {}; *************** *** 364,367 **** --- 370,376 ---- /foo/bar%20is%20baz/ + Finally: if C<$base_url> begins with 'http:' we do not modify it in + any way (including escaping it) except to append the C<\%params>. + Return: URL formed from the deployed context, C<$base_url> and C<\%params>. |