src/protocols/yahoo/yahoo_filexfer.c

changeset 10579
f4576b2e0956
parent 10576
ce7a6c585bc6
child 10651
b99174539d15
--- 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)

mercurial