This is the patch I put in for 0.25.5 in the mean time: it treats the
ICY protocol as being equivalent HTTP/1.0 (rather than HTTP/1.1) as I'd
guess the servers don't support chunked encoding etc properly.
Index: src/ne_request.c
===================================================================
--- src/ne_request.c (revision 842)
+++ src/ne_request.c (revision 843)
@@ -1,6 +1,6 @@
/*
HTTP request/response handling
- Copyright (C) 1999-2005, Joe Orton <[EMAIL PROTECTED]>
+ Copyright (C) 1999-2006, Joe Orton <[EMAIL PROTECTED]>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -971,8 +971,20 @@
if (status->reason_phrase) ne_free(status->reason_phrase);
memset(status, 0, sizeof *status);
- if (ne_parse_statusline(buffer, status))
+ if (strncmp(buffer, "ICY ", 4) == 0 && strlen(buffer) > 8
+ && buffer[7] == ' ') {
+ /* Hack for ShoutCast support; will be conditional in future
+ * releases. */
+ status->code = atoi(buffer + 4);
+ status->major_version = 1;
+ status->minor_version = 0;
+ status->reason_phrase = ne_strclean(ne_strdup(buffer + 8));
+ status->klass = buffer[4] - '0';
+ NE_DEBUG(NE_DBG_HTTP, "[status-line] ICY protocol; code %d\n",
+ status->code);
+ } else if (ne_parse_statusline(buffer, status)) {
return aborted(req, _("Could not parse response status line."), 0);
+ }
return 0;
}
_______________________________________________
neon mailing list
[email protected]
http://mailman.webdav.org/mailman/listinfo/neon