-#include "php_http.h"
+/*
+ +--------------------------------------------------------------------+
+ | PECL :: http |
+ +--------------------------------------------------------------------+
+ | Redistribution and use in source and binary forms, with or without |
+ | modification, are permitted provided that the conditions mentioned |
+ | in the accompanying LICENSE file are met. |
+ +--------------------------------------------------------------------+
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+ +--------------------------------------------------------------------+
+*/
+
+#include "php_http_api.h"
#ifdef PHP_HTTP_HAVE_HASH
# include "php_hash.h"
#ifdef PHP_HTTP_HAVE_HASH
const php_hash_ops *eho = NULL;
- if (mode && (eho = php_hash_fetch_ops(e->mode, strlen(e->mode)))) {
+ if (e->mode && (eho = php_hash_fetch_ops(e->mode, strlen(e->mode)))) {
eho->hash_final(digest, e->ctx);
etag = php_http_etag_digest(digest, eho->digest_size);
} else
#ifdef PHP_HTTP_HAVE_HASH
const php_hash_ops *eho = NULL;
- if (mode && (eho = php_hash_fetch_ops(e->mode, strlen(e->mode)))) {
+ if (e->mode && (eho = php_hash_fetch_ops(e->mode, strlen(e->mode)))) {
eho->hash_update(e->ctx, (const unsigned char *) data_ptr, data_len);
} else
#endif
return data_len;
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
+