changeset 10579:71478e6a6074

[gaim-migrate @ 11976] Fix receiving files on Yahoo with proxies that interfere with http headers committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sun, 06 Feb 2005 17:40:45 +0000
parents 650c11e9d3e5
children 662a99c6701f
files src/protocols/yahoo/yahoo_filexfer.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)