#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
-#include "php.h"
#include "php_http.h"
+
#include "php_http_api.h"
-#include "php_http_std_defs.h"
#include "php_http_info_api.h"
-#include <ctype.h>
-
ZEND_EXTERN_MODULE_GLOBALS(http);
PHP_HTTP_API void _http_info_default_callback(void **nothing, HashTable **headers, http_info *info TSRMLS_DC)
}
/* is request */
- else {
+ else if (!http[lenof("HTTP/1.x")] || http[lenof("HTTP/1.x")] == '\r' || http[lenof("HTTP/1.x")] == '\n') {
const char *url = strchr(pre_header, ' ');
info->type = IS_HTTP_REQUEST;
return SUCCESS;
}
+
+ /* some darn header containing HTTP/1.x */
+ else {
+ return FAILURE;
+ }
}