[FIX] HierarchicalUrl>>toText
Robert Hirschfeld
hirschfeld at acm.org
Mon Nov 20 17:03:07 UTC 2000
"Change Set: HierarchicalUrlToTextFix
Date: 20 November 2000
Author: Robert Hirschfeld
HierarchicalUrl>>toText omitted the port number so that in scenarios
like
['http://localhost:4321' asUrl postFormArgs: Dictionary new]
the provided URL port got dropped and defaulted to port 80."!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HierarchicalUrlToTextFix.20Nov0858.cs.gz
Type: application/x-gzip
Size: 516 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20001120/391cd0b1/HierarchicalUrlToTextFix.20Nov0858.cs.bin
-------------- next part --------------
'From Squeak2.9alpha of 2 September 2000 [latest update: #2915] on 20 November 2000 at 8:58:03 am'!
"Change Set: HierarchicalUrlToTextFix
Date: 20 November 2000
Author: Robert Hirschfeld
HierarchicalUrl>>toText omitted the port number so that in scenarios like
['http://localhost:4321' asUrl postFormArgs: Dictionary new]
the provided URL port got dropped and defaulted to port 80."!
!HierarchicalUrl methodsFor: 'printing' stamp: 'rhi 11/20/2000 08:37'!
toText
| ans |
ans _ WriteStream on: String new.
ans nextPutAll: self schemeName.
ans nextPutAll: '://'.
ans nextPutAll: self authority.
self port isNil ifFalse: [
ans nextPut: $:.
ans nextPutAll: self port asString. ].
path do: [ :pathElem |
ans nextPut: $/.
ans nextPutAll: pathElem encodeForHTTP. ].
self query isNil ifFalse: [
ans nextPut: $?.
ans nextPutAll: self query. ].
self fragment isNil ifFalse: [
ans nextPut: $#.
ans nextPutAll: self fragment encodeForHTTP. ].
^ans contents! !
More information about the Squeak-dev
mailing list
|