[mythtv] [mythtv-commits] Ticket #1301: HTTP/1.0 is evil

Andrew McNabb amcnabb at mcnabbs.org
Tue Feb 21 00:55:43 UTC 2006

On Thu, Feb 16, 2006 at 10:24:29AM -0000, MythTV wrote:
> #1301: HTTP/1.0 is evil
> ---------------------------------+------------------------------------------
>  Reporter:  amcnabb at mcnabbs.org  |       Owner:  ijr 
>      Type:  defect               |      Status:  new 
>  Priority:  minor                |   Milestone:      
> Component:  mythtv               |     Version:  head
>  Severity:  medium               |  
> ---------------------------------+------------------------------------------
>  It appears that QHTTP uses HTTP/1.0 by default.  This is problematic
>  because HTTP/1.0 is incompatible with transparent proxies in ways that are
>  difficult to work around.  In weather.cpp, most requests use HTTP/1.0 (the
>  default).  However, a few of them use HTTP/1.1 already, so it shouldn't be
>  very difficult to convert the others as well.

Okay.  I've looked into this problem some more, and it looks I like I
was mistaken about the cause of the problem.  I've done some dumps of
network traffic, and it turns out that requests are actually using
HTTP/1.1, but that they're malformed.

For example, instead of sending "Host: www.msnbc.com", it sends "host:
www.msnbc.com" (i.e. HTTP headers are being put into lowercase).

In HttpComms::request() in libmyth, we do:

header.setValue("Host", url.host());

with an uppercase header, but somehow it's being converted to lowercase,
presumably in QT's QHttpRequestHeader class.

Is there any way to work around this problem?

Andrew McNabb
PGP Fingerprint: 8A17 B57C 6879 1863 DE55  8012 AB4D 6098 8826 6868
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20060220/7f0e1402/attachment.pgp 

More information about the mythtv-dev mailing list