[vwnc] URL bug in VW

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

[vwnc] URL bug in VW

davidbuck
Try this code:

    ('http://www.cincom.com' asURI construct: 'userblogs') asString

You get:
     'http://www.cincom.com//userblogs'

The two / characters before userblogs are wrong.  There should only be
one / character.

I fixed this in my image by going to the method URLwithPath >>
resolvePath:do: and changing the second last line from:
        list := pString tokensBasedOn: $/.

to:
        list := (pString tokensBasedOn: $/) reject: [:each | each isEmpty].


I also find it rather disconcerting that
    ('http://www.cincom.com' asURI construct:
'userblogs/cincom/blogView') asString

produces:   'http://www.cincom.com/userblogs%2Fcincom%2FblogView'

I would have hoped that it would interpret the embedded / characters as
path delimiters.  Now I have to do a tokensBasedOn: and construct the
pieces myself.

David Buck


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] URL bug in VW

Michael Lucas-Smith-2
Hi Dave,

You're using the wrong API for what you want to do. Try this instead:

David Buck wrote:
> Try this code:
>
>     ('http://www.cincom.com' asURI construct: 'userblogs') asString
>  
('http://www.cincom.com' asURI, 'userblogs') asString
>
> I also find it rather disconcerting that
>     ('http://www.cincom.com' asURI construct:
> 'userblogs/cincom/blogView') asString
>  
('http://www.cincom.com' asURI, 'userblogs/cincom/blogView') asString

Cheers,
Michael
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc