projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- add HttpResponse::guessContentType() through libmagic
[m6w6/ext-http]
/
php_http_cache_api.h
diff --git
a/php_http_cache_api.h
b/php_http_cache_api.h
index b8120891239810c9136b9c2e79c308f17b25e311..4f067f5a0c72c5fcb8936faa3e80f3f3a52b95f8 100644
(file)
--- a/
php_http_cache_api.h
+++ b/
php_http_cache_api.h
@@
-28,7
+28,7
@@
#include "php_http_api.h"
#include "php_http_send_api.h"
#include "php_http_api.h"
#include "php_http_send_api.h"
-#ifdef H
AVE_LIB
MHASH
+#ifdef H
TTP_HAVE_
MHASH
# include <mhash.h>
#endif
# include <mhash.h>
#endif
@@
-40,7
+40,7
@@
typedef enum {
HTTP_ETAG_MHASH = 0,
} http_etag_mode;
HTTP_ETAG_MHASH = 0,
} http_etag_mode;
-#ifdef H
AVE_LIB
MHASH
+#ifdef H
TTP_HAVE_
MHASH
static void *http_etag_alloc_mhash_digest(size_t size)
{
return emalloc(size);
static void *http_etag_alloc_mhash_digest(size_t size)
{
return emalloc(size);
@@
-78,16
+78,16
@@
static inline void *_http_etag_init(TSRMLS_D)
break;
case HTTP_ETAG_MD5:
break;
case HTTP_ETAG_MD5:
-#ifndef H
AVE_LIB
MHASH
+#ifndef H
TTP_HAVE_
MHASH
default:
#endif
PHP_MD5Init(ctx = emalloc(sizeof(PHP_MD5_CTX)));
break;
default:
#endif
PHP_MD5Init(ctx = emalloc(sizeof(PHP_MD5_CTX)));
break;
-#ifdef H
AVE_LIB
MHASH
+#ifdef H
TTP_HAVE_
MHASH
default:
if ((mode < 0) || ((ulong)mode > mhash_count()) || (!(ctx = mhash_init(mode)))) {
default:
if ((mode < 0) || ((ulong)mode > mhash_count()) || (!(ctx = mhash_init(mode)))) {
- http_error_ex(HE_ERROR, HE_RUNTIME, "Invalid ETag mode: %ld", mode);
+ http_error_ex(HE_ERROR, H
TTP_
E_RUNTIME, "Invalid ETag mode: %ld", mode);
}
break;
#endif
}
break;
#endif
@@
-112,7
+112,7
@@
static inline char *_http_etag_finish(void *ctx TSRMLS_DC)
break;
case HTTP_ETAG_MD5:
break;
case HTTP_ETAG_MD5:
-#ifndef H
AVE_LIB
MHASH
+#ifndef H
TTP_HAVE_
MHASH
default:
#endif
PHP_MD5Final(digest, ctx);
default:
#endif
PHP_MD5Final(digest, ctx);
@@
-120,7
+120,7
@@
static inline char *_http_etag_finish(void *ctx TSRMLS_DC)
efree(ctx);
break;
efree(ctx);
break;
-#ifdef H
AVE_LIB
MHASH
+#ifdef H
TTP_HAVE_
MHASH
default:
{
unsigned char *mhash_digest = mhash_end_m(ctx, http_etag_alloc_mhash_digest);
default:
{
unsigned char *mhash_digest = mhash_end_m(ctx, http_etag_alloc_mhash_digest);
@@
-140,17
+140,17
@@
static inline void _http_etag_update(void *ctx, const char *data_ptr, size_t dat
switch (INI_INT("http.etag_mode"))
{
case HTTP_ETAG_SHA1:
switch (INI_INT("http.etag_mode"))
{
case HTTP_ETAG_SHA1:
- PHP_SHA1Update(ctx, data_ptr, data_len);
+ PHP_SHA1Update(ctx,
(const unsigned char *)
data_ptr, data_len);
break;
case HTTP_ETAG_MD5:
break;
case HTTP_ETAG_MD5:
-#ifndef H
AVE_LIB
MHASH
+#ifndef H
TTP_HAVE_
MHASH
default:
#endif
default:
#endif
- PHP_MD5Update(ctx, data_ptr, data_len);
+ PHP_MD5Update(ctx,
(const unsigned char *)
data_ptr, data_len);
break;
break;
-#ifdef H
AVE_LIB
MHASH
+#ifdef H
TTP_HAVE_
MHASH
default:
mhash(ctx, data_ptr, data_len);
break;
default:
mhash(ctx, data_ptr, data_len);
break;