{ s_dead = 1 /* important that this is > 0 */
, s_start_req_or_res
+ , s_res_or_resp_I /* for ICY URIs */
, s_res_or_resp_H
, s_start_res
+ , s_res_I /* for ICY URIs */
+ , s_res_IC /* for ICY URIs */
, s_res_H
, s_res_HT
, s_res_HTT
if (ch == 'H') {
UPDATE_STATE(s_res_or_resp_H);
+ CALLBACK_NOTIFY(message_begin);
+ } else if (ch == 'I') {
+ UPDATE_STATE(s_res_or_resp_I);
+
CALLBACK_NOTIFY(message_begin);
} else {
parser->type = HTTP_REQUEST;
break;
}
+ case s_res_or_resp_I: /* ICY URI case */
+ if (ch == 'C') {
+ parser->type = HTTP_RESPONSE;
+ UPDATE_STATE(s_res_IC);
+ }
+ break;
+
case s_res_or_resp_H:
if (ch == 'T') {
parser->type = HTTP_RESPONSE;
case 'H':
UPDATE_STATE(s_res_H);
break;
-
+ case 'I': /* ICY URI */
+ UPDATE_STATE(s_res_I);
+ break;
case CR:
case LF:
break;
CALLBACK_NOTIFY(message_begin);
break;
}
+ case s_res_I:
+ STRICT_CHECK(ch != 'C');
+ UPDATE_STATE(s_res_IC);
+ break;
+
+ case s_res_IC:
+ STRICT_CHECK(ch != 'Y');
+ UPDATE_STATE(s_res_http_minor);
+ break;
case s_res_H:
STRICT_CHECK(ch != 'T');