Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Util
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28406
Modified Files:
WebUtils.cs
Log Message:
fixed SPRNET-723 (made Head control adhere to standards)
Index: WebUtils.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Util/WebUtils.cs,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** WebUtils.cs 1 Aug 2007 23:37:14 -0000 1.30
--- WebUtils.cs 28 Nov 2007 23:26:00 -0000 1.31
***************
*** 158,172 ****
public static string CreateAbsolutePath(string applicationPath, string relativePath)
{
! if (relativePath.StartsWith("/"))
{
! return relativePath;
! }
! if (relativePath.StartsWith("~/"))
! {
! relativePath = relativePath.Substring(2);
}
! return applicationPath.TrimEnd('/') + '/' + relativePath;
}
--- 158,177 ----
public static string CreateAbsolutePath(string applicationPath, string relativePath)
{
! if (StringUtils.HasLength(relativePath))
{
! if (relativePath.StartsWith("/"))
! {
! return relativePath;
! }
! if (relativePath.StartsWith("~/"))
! {
! relativePath = relativePath.Substring(2);
! }
}
! applicationPath = (applicationPath == null) ? "" : applicationPath.TrimEnd('/');
!
! return string.Format("{0}/{1}", applicationPath, relativePath);
}
|