WAUrl>>encodePathOn: hack? patch?

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

WAUrl>>encodePathOn: hack? patch?

Sebastian Sastre-2
Hi ppl,
 
    trying to make work the resources configurations in Seaside 2.8 with Jetsam and found that if one also "hacks" WADispatcher not to use '/seaside/' but an empty string instead, then some strange things happen to the requests of the resources.
 
    Digging a little I reached #encodePathOn: in WAUrl and saw that allways inserts a slash. You can judge this as beign too much hacker, I don't know, but I was unable to found a better solution than changing the Lukas version:
 
encodePathOn: aDocument
 path ifNil: [ ^ self ].
 aDocument nextPut: $/.
 
 path
  do: [ :each | aDocument urlEncoder nextPutAll: each ]
  separatedBy: [ aDocument nextPut: $/ ]
 
to this one:
 
encodePathOn: aDocument
 path ifNil: [ ^ self ].
 path first ifNotEmpty: [aDocument nextPut: $/].
 path
  do: [ :each | aDocument urlEncoder nextPutAll: each ]
  separatedBy: [ aDocument nextPut: $/ ]
 
    Seems inocent but I really can't tell if it is going to harm any app out there so please tell me if it will be asimilated in seaside or I should use this in a private package.
 
    thanks,
 

Sebastian Sastre

 

 

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside