iTunes updates, courtesy of Shish

This commit is contained in:
Ron Pedde 2006-11-16 04:13:57 +00:00
parent 758c0c6245
commit 4d8e618f75

View File

@ -1047,7 +1047,9 @@ int ws_returnerror(WS_CONNINFO *pwsc,int error, char *description) {
/* we'll force a close here unless the user agent is /* we'll force a close here unless the user agent is
iTunes, which seems to get pissy about it */ iTunes, which seems to get pissy about it */
useragent = ws_getarg(&pwsc->request_headers,"User-Agent"); useragent = ws_getarg(&pwsc->request_headers,"User-Agent");
if((useragent) && (strncmp(useragent,"iTunes",6) == 0) && (error == 401)) { if((useragent) &&
(((strncmp(useragent,"iTunes",6) == 0) && (error == 401)) ||
((strncmp(useragent,"Java",4) == 0)))) {
ws_addarg(&pwsc->response_headers,"Connection","keep-alive"); ws_addarg(&pwsc->response_headers,"Connection","keep-alive");
ws_addarg(&pwsc->response_headers,"Content-Length","2"); ws_addarg(&pwsc->response_headers,"Content-Length","2");
ws_emitheaders(pwsc); ws_emitheaders(pwsc);