Possible bug in WAAdmin register: aRequestHandlerClass at: aString in: aDispatcher

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

Possible bug in WAAdmin register: aRequestHandlerClass at: aString in: aDispatcher

Bart Veenstra
Hi all,

While registring applications seaside other than root, my applications where not accessible at their paths. It seemd that the dispatcher was not tokenzing the path correctly, because the it takes the '/' as argument instead of the $/ causing the applications to be registered at the whole path, instead of registering a WADispatcher for the sub paths.

Don't know of this is the right list for it, but it caused me some headaches yesterday evening :)

Possible fix:

WAAdmin register: aRequestHandlerClass at: aString in: aDispatcher
| path dispatcher |
path := aString subStrings: $/.
dispatcher := path allButLast
inject: aDispatcher
into: [ :result :each |
result handlers 
at: each
ifAbsent: [ result register: WADispatcher new at: each ] ].
^ dispatcher register: aRequestHandlerClass new at: path last

Regards,

Bart

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Possible bug in WAAdmin register: aRequestHandlerClass at: aString in: aDispatcher

Lukas Renggli
This is strange. What platform are you on? What version?

On Thursday, August 26, 2010, Bart Veenstra <[hidden email]> wrote:

> Hi all,
> While registring applications seaside other than root, my applications where not accessible at their paths. It seemd that the dispatcher was not tokenzing the path correctly, because the it takes the '/' as argument instead of the $/ causing the applications to be registered at the whole path, instead of registering a WADispatcher for the sub paths.
>
> Don't know of this is the right list for it, but it caused me some headaches yesterday evening :)
> Possible fix:
> WAAdmin register: aRequestHandlerClass at: aString in: aDispatcher
> | path dispatcher | path := aString subStrings: $/. dispatcher := path allButLast
> inject: aDispatcher into: [ :result :each | result handlers
> at: each ifAbsent: [ result register: WADispatcher new at: each ] ].
> ^ dispatcher register: aRequestHandlerClass new at: path last
> Regards,
> Bart
>

--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Possible bug in WAAdmin register: aRequestHandlerClass at: aString in: aDispatcher

Bart Veenstra
I am on vw 77 with the latest seaside 3.0 from the public repos (87 i think). I checked the seaside one click image as well, and it also used a '/' instead of a /$ for tokenizing a String.



2010/8/27 Lukas Renggli <[hidden email]>
This is strange. What platform are you on? What version?

On Thursday, August 26, 2010, Bart Veenstra <[hidden email]> wrote:
> Hi all,
> While registring applications seaside other than root, my applications where not accessible at their paths. It seemd that the dispatcher was not tokenzing the path correctly, because the it takes the '/' as argument instead of the $/ causing the applications to be registered at the whole path, instead of registering a WADispatcher for the sub paths.
>
> Don't know of this is the right list for it, but it caused me some headaches yesterday evening :)
> Possible fix:
> WAAdmin register: aRequestHandlerClass at: aString in: aDispatcher
>       | path dispatcher |     path := aString subStrings: $/. dispatcher := path allButLast
>               inject: aDispatcher             into: [ :result :each |                 result handlers
>                               at: each                                ifAbsent: [ result register: WADispatcher new at: each ] ].
>       ^ dispatcher register: aRequestHandlerClass new at: path last
> Regards,
> Bart
>

--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Possible bug in WAAdmin register: aRequestHandlerClass at: aString in: aDispatcher

Julian Fitzell-2
The ',' is correct by ANSI and also tested for in Grease...

 ----- Method: GRStringTest>>testSubStrings (in category 'tests') -----
 testSubStrings
       "#subStrings: is defined by ANSI 5.7.10.15:
       Answer an array containing the substrings in the receiver
separated by the elements of separators."
       | mimeType tokens |
       mimeType := 'application/xhtml+xml'.
       tokens := mimeType subStrings: '/'.
       self assert: tokens size = 2.
       self assert: tokens first = 'application'.
       self assert: tokens second = 'xhtml+xml'.

On Fri, Aug 27, 2010 at 9:48 AM, Bart Veenstra <[hidden email]> wrote:

> I am on vw 77 with the latest seaside 3.0 from the public repos (87 i
> think). I checked the seaside one click image as well, and it also used a
> '/' instead of a /$ for tokenizing a String.
>
>
>
> 2010/8/27 Lukas Renggli <[hidden email]>
>>
>> This is strange. What platform are you on? What version?
>>
>> On Thursday, August 26, 2010, Bart Veenstra <[hidden email]>
>> wrote:
>> > Hi all,
>> > While registring applications seaside other than root, my applications
>> > where not accessible at their paths. It seemd that the dispatcher was not
>> > tokenzing the path correctly, because the it takes the '/' as argument
>> > instead of the $/ causing the applications to be registered at the whole
>> > path, instead of registering a WADispatcher for the sub paths.
>> >
>> > Don't know of this is the right list for it, but it caused me some
>> > headaches yesterday evening :)
>> > Possible fix:
>> > WAAdmin register: aRequestHandlerClass at: aString in: aDispatcher
>> >       | path dispatcher |     path := aString subStrings: $/. dispatcher
>> > := path allButLast
>> >               inject: aDispatcher             into: [ :result :each |
>> >               result handlers
>> >                               at: each
>> >  ifAbsent: [ result register: WADispatcher new at: each ] ].
>> >       ^ dispatcher register: aRequestHandlerClass new at: path last
>> > Regards,
>> > Bart
>> >
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Possible bug in WAAdmin register: aRequestHandlerClass at: aString in: aDispatcher

Lukas Renggli
In reply to this post by Bart Veenstra
The thing is that #subStrings: takes a String as argument according to
ANSI 5.7.10.15.

This is also tested in GRStringTest>>#testSubStrings.

So this must be a bug in VW.

Lukas

On 27 August 2010 10:48, Bart Veenstra <[hidden email]> wrote:

> I am on vw 77 with the latest seaside 3.0 from the public repos (87 i
> think). I checked the seaside one click image as well, and it also used a
> '/' instead of a /$ for tokenizing a String.
>
>
>
> 2010/8/27 Lukas Renggli <[hidden email]>
>>
>> This is strange. What platform are you on? What version?
>>
>> On Thursday, August 26, 2010, Bart Veenstra <[hidden email]>
>> wrote:
>> > Hi all,
>> > While registring applications seaside other than root, my applications
>> > where not accessible at their paths. It seemd that the dispatcher was not
>> > tokenzing the path correctly, because the it takes the '/' as argument
>> > instead of the $/ causing the applications to be registered at the whole
>> > path, instead of registering a WADispatcher for the sub paths.
>> >
>> > Don't know of this is the right list for it, but it caused me some
>> > headaches yesterday evening :)
>> > Possible fix:
>> > WAAdmin register: aRequestHandlerClass at: aString in: aDispatcher
>> >       | path dispatcher |     path := aString subStrings: $/. dispatcher
>> > := path allButLast
>> >               inject: aDispatcher             into: [ :result :each |
>> >               result handlers
>> >                               at: each
>> >  ifAbsent: [ result register: WADispatcher new at: each ] ].
>> >       ^ dispatcher register: aRequestHandlerClass new at: path last
>> > Regards,
>> > Bart
>> >
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>



--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Possible bug in WAAdmin register: aRequestHandlerClass at: aString in: aDispatcher

Bart Veenstra
In reply to this post by Julian Fitzell-2
It could be that the encoding in VW is handled differently on VW causing the subStrings method not to recognize the '/' as tokenizer. Maybe upgrading to vw771 would solve this. I'll give it a go

2010/8/27 Julian Fitzell <[hidden email]>
The ',' is correct by ANSI and also tested for in Grease...

 ----- Method: GRStringTest>>testSubStrings (in category 'tests') -----
 testSubStrings
      "#subStrings: is defined by ANSI 5.7.10.15:
      Answer an array containing the substrings in the receiver
separated by the elements of separators."
      | mimeType tokens |
      mimeType := 'application/xhtml+xml'.
      tokens := mimeType subStrings: '/'.
      self assert: tokens size = 2.
      self assert: tokens first = 'application'.
      self assert: tokens second = 'xhtml+xml'.

On Fri, Aug 27, 2010 at 9:48 AM, Bart Veenstra <[hidden email]> wrote:
> I am on vw 77 with the latest seaside 3.0 from the public repos (87 i
> think). I checked the seaside one click image as well, and it also used a
> '/' instead of a /$ for tokenizing a String.
>
>
>
> 2010/8/27 Lukas Renggli <[hidden email]>
>>
>> This is strange. What platform are you on? What version?
>>
>> On Thursday, August 26, 2010, Bart Veenstra <[hidden email]>
>> wrote:
>> > Hi all,
>> > While registring applications seaside other than root, my applications
>> > where not accessible at their paths. It seemd that the dispatcher was not
>> > tokenzing the path correctly, because the it takes the '/' as argument
>> > instead of the $/ causing the applications to be registered at the whole
>> > path, instead of registering a WADispatcher for the sub paths.
>> >
>> > Don't know of this is the right list for it, but it caused me some
>> > headaches yesterday evening :)
>> > Possible fix:
>> > WAAdmin register: aRequestHandlerClass at: aString in: aDispatcher
>> >       | path dispatcher |     path := aString subStrings: $/. dispatcher
>> > := path allButLast
>> >               inject: aDispatcher             into: [ :result :each |
>> >               result handlers
>> >                               at: each
>> >  ifAbsent: [ result register: WADispatcher new at: each ] ].
>> >       ^ dispatcher register: aRequestHandlerClass new at: path last
>> > Regards,
>> > Bart
>> >
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: Possible bug in WAAdmin register: aRequestHandlerClassat: aString in: aDispatcher

Boris Popov, DeepCove Labs (SNN)

Bart,

 

7.7,

  'abc/def' subStrings: '/'   >>   OrderedCollection ('abc' 'def')

 

7.7.1,

  'abc/def' subStrings: '/'   >>   OrderedCollection ('abc' 'def')

 

-Boris

 

--

DeepCove Labs Ltd.

+1 (604) 689-0322

4th floor, 595 Howe Street

Vancouver, British Columbia

Canada V6C 2T5

http://tinyurl.com/r7uw4

 

PacNet Services (Europe) Ltd.

+353 (0)61 714-360

Shannon Airport House, SFZ

County Clare, Ireland

http://tinyurl.com/y952amr

 

CONFIDENTIALITY NOTICE

 

This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments.

 

Thank you.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Bart Veenstra
Sent: 27 August 2010 11:27
To: Seaside - general discussion
Subject: Re: [Seaside] Possible bug in WAAdmin register: aRequestHandlerClassat: aString in: aDispatcher

 

It could be that the encoding in VW is handled differently on VW causing the subStrings method not to recognize the '/' as tokenizer. Maybe upgrading to vw771 would solve this. I'll give it a go

 

2010/8/27 Julian Fitzell <[hidden email]>

The ',' is correct by ANSI and also tested for in Grease...

 ----- Method: GRStringTest>>testSubStrings (in category 'tests') -----
 testSubStrings
      "#subStrings: is defined by ANSI 5.7.10.15:
      Answer an array containing the substrings in the receiver
separated by the elements of separators."
      | mimeType tokens |
      mimeType := 'application/xhtml+xml'.
      tokens := mimeType subStrings: '/'.
      self assert: tokens size = 2.
      self assert: tokens first = 'application'.
      self assert: tokens second = 'xhtml+xml'.


On Fri, Aug 27, 2010 at 9:48 AM, Bart Veenstra <[hidden email]> wrote:


> I am on vw 77 with the latest seaside 3.0 from the public repos (87 i
> think). I checked the seaside one click image as well, and it also used a
> '/' instead of a /$ for tokenizing a String.
>
>
>
> 2010/8/27 Lukas Renggli <[hidden email]>
>>
>> This is strange. What platform are you on? What version?
>>
>> On Thursday, August 26, 2010, Bart Veenstra <[hidden email]>
>> wrote:
>> > Hi all,
>> > While registring applications seaside other than root, my applications
>> > where not accessible at their paths. It seemd that the dispatcher was not
>> > tokenzing the path correctly, because the it takes the '/' as argument
>> > instead of the $/ causing the applications to be registered at the whole
>> > path, instead of registering a WADispatcher for the sub paths.
>> >
>> > Don't know of this is the right list for it, but it caused me some
>> > headaches yesterday evening :)
>> > Possible fix:
>> > WAAdmin register: aRequestHandlerClass at: aString in: aDispatcher
>> >       | path dispatcher |     path := aString subStrings: $/. dispatcher
>> > := path allButLast
>> >               inject: aDispatcher             into: [ :result :each |
>> >               result handlers
>> >                               at: each
>> >  ifAbsent: [ result register: WADispatcher new at: each ] ].
>> >       ^ dispatcher register: aRequestHandlerClass new at: path last
>> > Regards,
>> > Bart
>> >
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

 


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