Mercurial > pidgin
comparison src/protocols/yahoo/yahoo_filexfer.c @ 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 | 6c6772d3ea31 |
children | 8fbab42659c2 |
comparison
equal
deleted
inserted
replaced
10578:650c11e9d3e5 | 10579:71478e6a6074 |
---|---|
264 xd->rxqueue = g_realloc(xd->rxqueue, len + xd->rxlen); | 264 xd->rxqueue = g_realloc(xd->rxqueue, len + xd->rxlen); |
265 memcpy(xd->rxqueue + xd->rxlen, buf, len); | 265 memcpy(xd->rxqueue + xd->rxlen, buf, len); |
266 xd->rxlen += len; | 266 xd->rxlen += len; |
267 | 267 |
268 length = g_strstr_len(xd->rxqueue, len, "Content-length:"); | 268 length = g_strstr_len(xd->rxqueue, len, "Content-length:"); |
269 /* some proxies re-write this header, changing the capitalization :( | |
270 * technically that's allowed since headers are case-insensitive | |
271 * [RFC 2616, section 4.2] */ | |
272 if (length == NULL) | |
273 length = g_strstr_len(xd->rxqueue, len, "Content-Length:"); | |
269 if (length) { | 274 if (length) { |
270 end = g_strstr_len(length, length - xd->rxqueue, "\r\n"); | 275 end = g_strstr_len(length, length - xd->rxqueue, "\r\n"); |
271 if (!end) | 276 if (!end) |
272 return 0; | 277 return 0; |
273 if ((filelen = calculate_length(length, len - (length - xd->rxqueue)))) | 278 if ((filelen = calculate_length(length, len - (length - xd->rxqueue)))) |