You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Laurent Michenaud <lm...@adeuza.fr> on 2005/05/20 10:29:44 UTC

Bind method and accents

Bind with accents are not working well.

 

I have created a resource /slide/files/testé

Then i created a bind named /slide/files/testéé

 

In the internet browser, i can see : test%C3%A9%C3%A9/ <http://localhost:8081/slide/files/test%25C3%25A9%25C3%25A9> 

 

The Java code :

 

HttpURL oHttpURL = new HttpURL("http://localhost:8081/slide/");

oHttpURL.setUserinfo("root", "root");

WebdavResource r_oWebdavResource = new WebdavResource(oHttpURL);

r_oWebdavResource.bindMethod( "/slide/files/testé", "/slide/files/testéé");

oWebdavResource.close();

 

The http request :

<?xml version="1.0" encoding="utf-8" ?><D:propfind xmlns:D="DAV:"><D:prop><D:displayname/><D:getcontentlength/><D:getcontenttype/><D:resourcetype/><D:getlastmodified/><D:lockdiscovery/></D:prop></D:propfind>BIND /slide/files HTTP/1.1

Authorization: Basic ************

User-Agent: Jakarta Commons-HttpClient/3.0-rc2

Host: localhost:8082

Cookie: $Version=0; JSESSIONID=1FA963D1E55AA8CC5D0640E528DCFE19; $Path=/slide

Content-Length: 150

Content-Type: text/xml; charset=utf-8

Overwrite: F

<?xml version="1.0" encoding="utf-8" ?><D:bind xmlns:D="DAV:"><D:segment>test%C3%A9%C3%A9</D:segment><D:href>/slide/files/test%C3%A9</D:href></D:bind>

 

 

All other methods( mkcol, move, renamed...) work well with accents.

 

 

 

 


Re: Bind method and accents

Posted by Jacob Lund <jl...@qualiware.net>.
ahh - missed that. Thanks. :)


----- Original Message ----- 
From: "Julian Reschke" <ju...@gmx.de>
To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
Sent: Friday, May 20, 2005 12:31 PM
Subject: Re: Bind method and accents


> Jacob Lund wrote:
>> Hi Julian!
>>
>> Is the DAV:segment considered a part of the path?
>
> Yes.
>
>> The segment is just a name. From what I can read in the BIND document, 
>> the segment can only contain a name and not a uri or a relative uri.
>
> Yes.
>
>> Does the fact the a segment in a request body is to be used in a uri 
>> automatically make this segment a path?
>
> No.
>
> Please check
>
> <http://greenbytes.de/tech/webdav/draft-ietf-webdav-bind-11.html#rfc.iref.2>
>
> and follow-up if this still is not clear.
>
> Best regards, Julian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: Bind method and accents

Posted by Julian Reschke <ju...@gmx.de>.
Jacob Lund wrote:
> Hi Julian!
> 
> Is the DAV:segment considered a part of the path?

Yes.

> The segment is just a name. From what I can read in the BIND document, 
> the segment can only contain a name and not a uri or a relative uri. 

Yes.

> Does the fact the a segment in a request body is to be used in a uri 
> automatically make this segment a path?

No.

Please check

	<http://greenbytes.de/tech/webdav/draft-ietf-webdav-bind-11.html#rfc.iref.2>

and follow-up if this still is not clear.

Best regards, Julian


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: Bind method and accents

Posted by Jacob Lund <jl...@qualiware.net>.
Hi Julian!

Is the DAV:segment considered a part of the path?

The segment is just a name. From what I can read in the BIND document, the 
segment can only contain a name and not a uri or a relative uri. Does the 
fact the a segment in a request body is to be used in a uri automatically 
make this segment a path?

/Jacob



----- Original Message ----- 
From: "Julian Reschke" <ju...@gmx.de>
To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
Sent: Friday, May 20, 2005 11:46 AM
Subject: Re: Bind method and accents


> Jacob Lund wrote:
>> Are you sure that the DAV:segment should be escaped? Normally only the 
>> href elements are escaped.
>
> It's part of the URI, thus the same escaping rules apply:
>
> <http://greenbytes.de/tech/webdav/rfc3986.html#rfc.iref.112>
>
>> ...
>
>
> Best regards,
>
> Julian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: Bind method and accents

Posted by Julian Reschke <ju...@gmx.de>.
Jacob Lund wrote:
> Are you sure that the DAV:segment should be escaped? Normally only the 
> href elements are escaped.

It's part of the URI, thus the same escaping rules apply:

<http://greenbytes.de/tech/webdav/rfc3986.html#rfc.iref.112>

> ...


Best regards,

Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: Bind method and accents

Posted by Jacob Lund <jl...@qualiware.net>.
Are you sure that the DAV:segment should be escaped? Normally only the href 
elements are escaped.

Try to send the request with the DAV:segment utf-8 encoded but not escaped.

/jacob

----- Original Message ----- 
From: "Laurent Michenaud" <lm...@adeuza.fr>
To: "Slide Users Mailing List" <sl...@jakarta.apache.org>
Sent: Friday, May 20, 2005 10:29 AM
Subject: Bind method and accents


Bind with accents are not working well.



I have created a resource /slide/files/testé

Then i created a bind named /slide/files/testéé



In the internet browser, i can see : test%C3%A9%C3%A9/ 
<http://localhost:8081/slide/files/test%25C3%25A9%25C3%25A9>



The Java code :



HttpURL oHttpURL = new HttpURL("http://localhost:8081/slide/");

oHttpURL.setUserinfo("root", "root");

WebdavResource r_oWebdavResource = new WebdavResource(oHttpURL);

r_oWebdavResource.bindMethod( "/slide/files/testé", "/slide/files/testéé");

oWebdavResource.close();



The http request :

<?xml version="1.0" encoding="utf-8" ?><D:propfind 
xmlns:D="DAV:"><D:prop><D:displayname/><D:getcontentlength/><D:getcontenttype/><D:resourcetype/><D:getlastmodified/><D:lockdiscovery/></D:prop></D:propfind>BIND 
/slide/files HTTP/1.1

Authorization: Basic ************

User-Agent: Jakarta Commons-HttpClient/3.0-rc2

Host: localhost:8082

Cookie: $Version=0; JSESSIONID=1FA963D1E55AA8CC5D0640E528DCFE19; 
$Path=/slide

Content-Length: 150

Content-Type: text/xml; charset=utf-8

Overwrite: F

<?xml version="1.0" encoding="utf-8" ?><D:bind 
xmlns:D="DAV:"><D:segment>test%C3%A9%C3%A9</D:segment><D:href>/slide/files/test%C3%A9</D:href></D:bind>





All other methods( mkcol, move, renamed...) work well with accents.











---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: Bind method and accents

Posted by "Marco T. Avila" <ph...@yahoo.com.mx>.
Hello Laurent, can you test also query string parameters?, something
like this:

http://localhost:8081/slide/files/test%25C3%25A9%25C3%25A9?param1=value1&param2=value2


Works?

Regards



Laurent Michenaud wrote:

>Bind with accents are not working well.
>
> 
>
>I have created a resource /slide/files/testé
>
>Then i created a bind named /slide/files/testéé
>
> 
>
>In the internet browser, i can see : test%C3%A9%C3%A9/ <http://localhost:8081/slide/files/test%25C3%25A9%25C3%25A9> 
>
> 
>
>The Java code :
>
> 
>
>HttpURL oHttpURL = new HttpURL("http://localhost:8081/slide/");
>
>oHttpURL.setUserinfo("root", "root");
>
>WebdavResource r_oWebdavResource = new WebdavResource(oHttpURL);
>
>r_oWebdavResource.bindMethod( "/slide/files/testé", "/slide/files/testéé");
>
>oWebdavResource.close();
>
> 
>
>The http request :
>
><?xml version="1.0" encoding="utf-8" ?><D:propfind xmlns:D="DAV:"><D:prop><D:displayname/><D:getcontentlength/><D:getcontenttype/><D:resourcetype/><D:getlastmodified/><D:lockdiscovery/></D:prop></D:propfind>BIND /slide/files HTTP/1.1
>
>Authorization: Basic ************
>
>User-Agent: Jakarta Commons-HttpClient/3.0-rc2
>
>Host: localhost:8082
>
>Cookie: $Version=0; JSESSIONID=1FA963D1E55AA8CC5D0640E528DCFE19; $Path=/slide
>
>Content-Length: 150
>
>Content-Type: text/xml; charset=utf-8
>
>Overwrite: F
>
><?xml version="1.0" encoding="utf-8" ?><D:bind xmlns:D="DAV:"><D:segment>test%C3%A9%C3%A9</D:segment><D:href>/slide/files/test%C3%A9</D:href></D:bind>
>
> 
>
> 
>
>All other methods( mkcol, move, renamed...) work well with accents.
>
> 
>
> 
>
> 
>
> 
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org