The Trunk: Network-bp.66.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Network-bp.66.mcz

commits-2
Andreas Raab uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-bp.66.mcz

==================== Summary ====================

Name: Network-bp.66
Author: bp
Time: 25 March 2010, 9:43:57.881 pm
UUID: 5c39cd9e-6ab8-4899-9273-e88d8aa2981c
Ancestors: Network-nice.65

Fix for redirect locations starting with '/', e.g. http://www.squeaksource.com

=============== Diff against Network-nice.65 ===============

Item was added:
+ ----- Method: HTTPSocket class>>ip:port:urlPath: (in category 'utilities') -----
+ ip: byteArrayIP port: portNum urlPath: urlPathString
+ ^String streamContents: [:stream |
+ byteArrayIP
+ do: [:each | each printOn: stream]
+ separatedBy: [stream nextPut: $.].
+ stream nextPut: $:.
+ portNum printOn: stream.
+ stream nextPutAll: urlPathString]!

Item was changed:
  ----- Method: HTTPSocket class>>expandUrl:ip:port: (in category 'utilities') -----
  expandUrl: newUrl ip: byteArrayIP port: portNum
+ (newUrl beginsWith: '../') ifTrue: [^self ip: byteArrayIP port: portNum urlPath: (newUrl allButFirst: 2)].
+ (newUrl beginsWith: '/') ifTrue: [^self ip: byteArrayIP port: portNum urlPath: newUrl].
+ ^newUrl!
-
- ^ (newUrl beginsWith: '../')
- ifTrue: [
- String streamContents: [:strm |
- byteArrayIP do: [:bb | bb printOn: strm.  strm nextPut: $.].
- strm skip: -1; nextPut: $:.
- portNum printOn: strm.
- strm nextPutAll: (newUrl allButFirst: 2)]]
- ifFalse: [newUrl]!