-PHP_INI_DISP(http_etag_mode_displayer)
-{
- long value;
-
- if (type == ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
- value = (ini_entry->orig_value) ? atoi(ini_entry->orig_value) : HTTP_ETAG_MD5;
- } else if (ini_entry->value) {
- value = (ini_entry->value[0]) ? atoi(ini_entry->value) : HTTP_ETAG_MD5;
- } else {
- value = HTTP_ETAG_MD5;
- }
-
- switch (value)
- {
- case HTTP_ETAG_SHA1:
- ZEND_WRITE("HTTP_ETAG_SHA1", lenof("HTTP_ETAG_SHA1"));
- break;
-
- case HTTP_ETAG_MD5:
-#ifndef HTTP_HAVE_MHASH
- default:
-#endif
- ZEND_WRITE("HTTP_ETAG_MD5", lenof("HTTP_ETAG_MD5"));
- break;
-
-#ifdef HTTP_HAVE_MHASH
- default:
- {
- const char *hash_name = mhash_get_hash_name_static(value);
-
- if (!hash_name) {
- ZEND_WRITE("HTTP_ETAG_MD5", lenof("HTTP_ETAG_MD5"));
- } else {
- ZEND_WRITE("HTTP_ETAG_MHASH_", lenof("HTTP_ETAG_MHASH_"));
- ZEND_WRITE(hash_name, strlen(hash_name));
- }
- }
- break;
-#endif
- }
-}
-