[mythtv] [mythtv-commits] mythtv commit: r18194 by nigel

Michael T. Dean mtdean at thirdcontact.com
Mon Aug 25 04:51:36 UTC 2008

On 08/24/2008 11:44 PM, mythtv at cvs.mythtv.org wrote:
>       Author: nigel
>         Date: 2008-08-25 03:44:45 +0000 (Mon, 25 Aug 2008)
> New Revision: 18194
>    Changeset: http://cvs.mythtv.org/trac/changeset/18194
> Modified:
>    trunk/mythtv/libs/libmythdb/httpcomms.cpp
> Log:
> Merge the correct patch this time.
> Revert [17896], which was breaking complex getHttp() calls. Creating a header 
> with the full query from toEncoded() resulted in the server being sent 
> GET http://server:port/path?query 
> which is too much for most web servers.

Heh.  According to the HTTP spec ( http://www.faqs.org/rfcs/rfc2616.html 
) section 5.1.2, all HTTP/1.1 servers must accept an absolute URI in 

>  They just need path and query.

However, from the same section of the spec, HTTP/1.1 clients should 
really only send absolute URI's in requests to proxies, so we really 
should ensure we use the absolute path form, as you've done.

Looks like we could use QUrl::toEncoded() ( 
http://doc.trolltech.com/4.3/qurl.html#toEncoded ), as in the reverted 
change, but we need to specify formatting options ( 
http://doc.trolltech.com/4.3/qurl.html#FormattingOption-enum ).  Seems 
we'd need QUrl::RemoveScheme | QUrl::RemoveAuthority where scheme is the 
"http" (protocol) portion and authority is 
<user>:<password>@<hostname>:<port> portion (see 
http://doc.trolltech.com/4.3/qurl.html#setAuthority for a nice pretty 
picture showing the parts).

> Note 1: I have not tested it against many different urls and web servers. 
> (Need a test harness, and a way for the builds to automatically run it)
> Note 2: Not tested with fragments (..... ?#comments)

Note: I have not tested my approach at all.  :)


More information about the mythtv-dev mailing list