request_headers = PHP_HTTP_G->env.request.headers;
}
- if ((zvalue == zend_symtable_str_find(request_headers, key, name_len))) {
+ if ((zvalue = zend_symtable_str_find(request_headers, key, name_len))) {
zend_string *zs = zval_get_string(zvalue);
val = estrndup(zs->val, zs->len);
#define M_SEC 2
#define M_ANY 1
#define M_NOT 0
-#define M_ALL -1
+#define M_ALL ~0
static inline unsigned php_http_negotiate_match(const char *param_str, size_t param_len, const char *supported_str, size_t supported_len, const char *sep_str, size_t sep_len)
{
- int match = M_NOT;
+ unsigned match = M_NOT;
if (param_len == supported_len && !strncasecmp(param_str, supported_str, param_len)) {
/* that was easy */
q = 1.0 - ++i / 100.0;
}
+#if 0
+ fprintf(stderr, "Q: %s=%1.3f\n", key.key->val, q);
+#endif
+
if (key.key) {
add_assoc_double_ex(&arr, key.key->val, key.key->len, q);
} else {