Hi,

I work actually on a framework to manage a Proxmox server. The Proxmox solution 
is based on a strange REST API… :-(

To get informations about an user, I must send a string with the login and the 
authentication domain. The two values are separated by a character @. 

For example: GET /api2/extjs/access/users/auverlot@LIFL

My first problem with Zinc is that the client find the character @ and the 
client think that this is an URL with authentication. I tried to use an 
encoding string with %40 but Proxmox don't find the user.

The solution must be to modify the method ZnUrl>>#parseAuthority:from:to: to do 
a better detection of authentication pattern:

parseAuthority: string from: start to: stop
        | index  |

        index := string indexOf: $@ startingAt: start.
        
        (index > 0 and: [ (string indexOf: $: startingAt: start) < index and: [ 
index < (string indexOf: $/ startingAt: start) ] ])
                ifTrue: [  
                        self parseUserInfo: (ReadStream on: string from: start 
to: index - 1).
                        self parseHostPort: (ReadStream on: string from: index  
 1 to: stop ) 
                ]
                ifFalse: [  self parseHostPort: (ReadStream on: string from: 
start to: stop ) ] 

But, it's not the end of the road :-( Because in the next steps, Zinc encodes 
the character @ in the url.  How to disabled the automatic encoding and using 
special characters in the url ?

Thanks for your help.

Best regards
Olivier ;-)

Reply via email to