Chris Muller uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-fbs.102.mcz==================== Summary ====================
Name: Network-fbs.102
Author: fbs
Time: 17 December 2010, 9:27:25.292 am
UUID: 0f6469e4-95d9-f746-b709-438d5ebe0f65
Ancestors: Network-cmm.101
Fix TestURI>>testDirWithHash. Given that FileDirectory>>uri had "encodeForHTTP" commented out, I'd appreciate extra pair of eyes on this change. If there are good reasons not to URI-encode the path bits, please add a comment explaining why!
=============== Diff against Network-cmm.101 ===============
Item was changed:
----- Method: DosFileDirectory class>>privateFullPathForURI: (in category '*network-uri') -----
privateFullPathForURI: aURI
| path |
+ path := aURI path unescapePercents.
- path := aURI path.
"Check for drive notation (a: etc)"
path size > 1
ifTrue: [
((path at: 3) = $:)
ifTrue: [path := path copyFrom: 2 to: path size]
ifFalse: [
"All other cases should be network path names (\\xxx\sdsd etc)"
path := '/' , path]].
^(path copyReplaceAll: '/' with: self slash) unescapePercents!
Item was changed:
----- Method: FileDirectory>>uri (in category '*network-uri') -----
uri
"Convert my path into a file:// type url. Use slash instead of the local delimiter (:), and convert odd characters to %20 notation."
"If slash (/) is not the file system delimiter, encode slashes before converting."
| list |
list := self pathParts.
^(String streamContents: [:strm |
strm nextPutAll: 'file:'.
+ list do: [:each | strm nextPut: $/; nextPutAll: each encodeForHTTP].
- list do: [:each | strm nextPut: $/; nextPutAll: each "encodeForHTTP"].
strm nextPut: $/]) asURI!