[Common-dev] CN-Client: Fix HXURLRep so that it doesn't unescape the path when doing normalization

[Common-dev] CN-Client: Fix HXURLRep so that it doesn't unescape the path when doing normalization

Aaron Colwell acolwell at real.com
Mon Aug 2 17:35:18 PDT 2004


Modified by: acolwell at real.com

Reviewed by: liamm at real.com

Date: 08:02:2004

Project: HEAD

On Mon, Aug 02, 2004 at 05:32:51PM -0700, Liam Murray wrote:
> 
> Looks good to me.
> 
> Liam
> 
> At 05:16 PM 8/2/2004, Aaron Colwell wrote:
> >Synopsis: Fix HXURLRep so that it doesn't unescape the path before doing
> >          path normalization
> >
> >Overview: These changes remove the unescaping code for path normalization.
> >          This prevents the normalization code from operating on escaped
> >          '\\' and '/' characters. Escaped characters should not be 
> >considered
> >          for path normalization. They should be treated as opaque data. 
> >These
> >          changes make sure that occurs.
> >
> >          The unit tests were updated to expect this behavior.
> >
> >Files Modified:
> >common/util/hxurlrep.cpp
> >common/util/test/thxurlrep.in
> >
> >Files Added:
> >
> >Image Size and Heap Use impact:
> >
> >Platforms and Profiles affected: all
> >
> >Distribution Libraries affected: none
> >
> >Distribution library impact and planned action: none
> >
> >Platforms and Profiles Build Verified: win32
> >
> >Platforms and Profiles Functionality verified: win32
> >
> >Branch: HEAD
> >
> >QA Instructions: none
> >
> >Index: hxurlrep.cpp
> >===================================================================
> >RCS file: /cvsroot/common/util/hxurlrep.cpp,v
> >retrieving revision 1.2
> >diff -u -r1.2 hxurlrep.cpp
> >--- hxurlrep.cpp        2 Jul 2004 16:41:12 -0000       1.2
> >+++ hxurlrep.cpp        3 Aug 2004 00:12:32 -0000
> >@@ -170,10 +170,7 @@
> > {
> >     // fixes "c:\foo\bar.rm" and "/foo/bar/../wam.rm"
> >
> >-    // unescape, normalize and escape again
> >-    CHXString path = HXEscapeUtil::UnEscape(m_path);
> >-    path = HXPathUtil::NormalizeNetPath(path);
> >-    m_path = HXEscapeUtil::EscapePath(path);
> >+    m_path = HXPathUtil::NormalizeNetPath(m_path);
> >     BuildURL();
> > }
> >
> >Index: test/thxurlrep.in
> >===================================================================
> >RCS file: /cvsroot/common/util/test/thxurlrep.in,v
> >retrieving revision 1.1
> >diff -u -r1.1 thxurlrep.in
> >--- test/thxurlrep.in   2 Aug 2004 22:09:38 -0000       1.1
> >+++ test/thxurlrep.in   3 Aug 2004 00:12:32 -0000
> >@@ -922,7 +922,7 @@
> >
> > # Test invalid hostnames
> > HXURLRep(url) "rtsp://a/blah.rm"
> >-CheckValidInfo 0 1 0
> >+CheckValidInfo 1 1 1
> > String "rtsp://a/blah.rm"
> > CheckState "rtsp" "a" 0 "blah.rm" ""
> > Path "blah.rm"
> >@@ -1447,8 +1447,8 @@
> >  Query ""
> >  UserInfo ""
> >  Normalize
> >- CheckState "file" "" 0 "c:/foo/bar.rm" ""
> >- Path "c:/foo/bar.rm"
> >+ CheckState "file" "" 0 "c:%5cfoo%5Cbar.rm" ""
> >+ Path "c:\\foo\\bar.rm"
> >
> >  HXURLRep(url) "file:///c:%5cfoo%5Cbar/foo/foo.rm"
> >  CheckValidInfo 1 1 1
> >@@ -1457,8 +1457,8 @@
> >  Query ""
> >  UserInfo ""
> >  Normalize
> >- CheckState "file" "" 0 "c:/foo/bar/foo/foo.rm" ""
> >- Path "c:/foo/bar/foo/foo.rm"
> >+ CheckState "file" "" 0 "c:%5cfoo%5Cbar/foo/foo.rm" ""
> >+ Path "c:\\foo\\bar/foo/foo.rm"
> >
> >  HXURLRep(url) "file:///c:/foo/bar.rm"
> >  CheckValidInfo 1 1 1
> >
> >_______________________________________________
> >Common-dev mailing list
> >Common-dev at lists.helixcommunity.org
> >http://lists.helixcommunity.org/mailman/listinfo/common-dev
> 
> 



More information about the Common-dev mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.