if (strncmp(buf->content(), "ICY", 3) == 0) {
protoPrefix = "ICY";
pos = protoPrefix.psize();
- }
- else {
+ } else {
if (protoPrefix.cmp(buf->content(), protoPrefix.size()) != 0) {
debugs(58, 3, "HttpReply::sanityCheckStartLine: missing protocol prefix (" << protoPrefix << ") in '" << buf->content() << "'");
// catch missing or negative status value (negative '-' is not a digit)
pos = protoPrefix.psize();
-
+
// skip arbitrary number of digits and a dot in the verion portion
while ( pos <= buf->contentSize() && (*(buf->content()+pos) == '.' || xisdigit(*(buf->content()+pos)) ) ) ++pos;
debugs(57, 3, "httpStatusLineParse: Invalid HTTP identifier. Detected ICY protocol istead.");
sline->protocol = PROTO_ICY;
start += protoPrefix.size();
- }
- else if (protoPrefix.caseCmp(start, protoPrefix.size()) == 0) {
+ } else if (protoPrefix.caseCmp(start, protoPrefix.size()) == 0) {
start += protoPrefix.size();
if (sscanf(start, "%d.%d", &sline->version.major, &sline->version.minor) != 2) {
debugs(57, 7, "httpStatusLineParse: Invalid HTTP identifier.");
}
- }
- else
+ } else
return 0;
if (!(start = strchr(start, ' ')))