# HG changeset patch # User Stu Tomlinson # Date 1107711645 0 # Node ID 71478e6a6074e146a3a5c081cf2d521410932f54 # Parent 650c11e9d3e57850951b3900f99e50eb038123b1 [gaim-migrate @ 11976] Fix receiving files on Yahoo with proxies that interfere with http headers committer: Tailor Script diff -r 650c11e9d3e5 -r 71478e6a6074 src/protocols/yahoo/yahoo_filexfer.c --- a/src/protocols/yahoo/yahoo_filexfer.c Sun Feb 06 15:18:02 2005 +0000 +++ b/src/protocols/yahoo/yahoo_filexfer.c Sun Feb 06 17:40:45 2005 +0000 @@ -266,6 +266,11 @@ xd->rxlen += len; length = g_strstr_len(xd->rxqueue, len, "Content-length:"); + /* some proxies re-write this header, changing the capitalization :( + * technically that's allowed since headers are case-insensitive + * [RFC 2616, section 4.2] */ + if (length == NULL) + length = g_strstr_len(xd->rxqueue, len, "Content-Length:"); if (length) { end = g_strstr_len(length, length - xd->rxqueue, "\r\n"); if (!end)