- /* there must be HTTP/1.x in the line
- * and nothing than SPACE or NUL after HTTP/1.x
- */
- if ( (!(http = php_memnstr((char *) pre_header, "HTTP/1.", lenof("HTTP/1."), (char *)end))) ||
- (!(http < end)) ||
- (!HTTP_IS_CTYPE(digit, http[lenof("HTTP/1.")])) ||
+ /* there must be HTTP/1.x in the line */
+ if (!(http = http_locate_str(pre_header, end - pre_header, "HTTP/1.", lenof("HTTP/1.")))) {
+ return FAILURE;
+ }
+
+ /* and nothing than SPACE or NUL after HTTP/1.x */
+ if ( (!HTTP_IS_CTYPE(digit, http[lenof("HTTP/1.")])) ||