qt-interest@trolltech.com
[Top] [All Lists]

Re: [Qt-interest] Request to URL including percent

Subject: Re: [Qt-interest] Request to URL including percent
From: "KIMURA, Hidetaka"
Date: Thu, 18 Dec 2008 14:21:44 +0900
Great!
I'll try 4.5 version.

Thanks ;-)

On Wed, 17 Dec 2008 17:52:57 +0100
Thiago Macieira <thiago.macieira@xxxxxxxxxxxxx> wrote:

> On Wednesday 17 December 2008 10:26:10 KIMURA, Hidetaka wrote:
> > Thanks, but it makes a request to /a:b.
> > QUrl::fromPercentEncoding also did not make a request to /a%3Ab...
> 
> %3A is a colon. QUrl in Qt 4.4 cannot hold a percent-encoded character if the 
> RFC 3986 says it's not supposed to be encoded at that position.
> 
> QUrl in Qt 4.5 is now capable of holding the URL exactly as you passed it.
> 
> So, 
> 
>       QUrl u = QUrl::fromEncoded("http://example.com/a%3Ab";);
>       qDebug() << u.encodedPath();
>       qDebug() << u.path();
> 
> will print:
>       /a%3Ab
>       /a:b
> 
> and:
>       qDebug() << u.toEncoded();
>       qDebug() << u.toString();
> 
> prints:
>       http://example.com/a%3Ab
>       http://example.com/a:b
> -- 
> Thiago Macieira - thiago.macieira (AT) nokia.com
>   Senior Software Engineer - Nokia, Qt Software
>   Qt Software is hiring - ask me
>       Sandakerveien 116, NO-0402 Oslo, Norway

-------
木村秀敬 - kimura@xxxxxx
株式会社 jig.jp

_______________________________________________
Qt-interest mailing list
Qt-interest@xxxxxxxxxxxxx
http://lists.trolltech.com/mailman/listinfo/qt-interest

<Prev in Thread] Current Thread [Next in Thread>