projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- finish work on encoding api
[m6w6/ext-http]
/
http_info_api.c
diff --git
a/http_info_api.c
b/http_info_api.c
index 6756b2c544e5fe52d92e3cb7d7e2612cffd2b3d6..b1ffcbc4c8ea9372ef76d4e7e7d8c9025e7c109f 100644
(file)
--- a/
http_info_api.c
+++ b/
http_info_api.c
@@
-15,17
+15,12
@@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
-#include "php.h"
#include "php_http.h"
#include "php_http.h"
+
#include "php_http_api.h"
#include "php_http_api.h"
-#include "php_http_std_defs.h"
#include "php_http_info_api.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)
{
zval array;
PHP_HTTP_API void _http_info_default_callback(void **nothing, HashTable **headers, http_info *info TSRMLS_DC)
{
zval array;
@@
-119,7
+114,7
@@
PHP_HTTP_API STATUS _http_info_parse_ex(const char *pre_header, http_info *info,
}
/* is request */
}
/* 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;
const char *url = strchr(pre_header, ' ');
info->type = IS_HTTP_REQUEST;
@@
-133,6
+128,11
@@
PHP_HTTP_API STATUS _http_info_parse_ex(const char *pre_header, http_info *info,
return SUCCESS;
}
return SUCCESS;
}
+
+ /* some darn header containing HTTP/1.x */
+ else {
+ return FAILURE;
+ }
}
}