You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@kiwi.ICS.UCI.EDU> on 1997/06/27 22:11:54 UTC
Re: Am I really this stupid
In message <9706270948.AA22604@ jrc.it>, "Dirk.vanGulik" writes:
>
>Just a tidbit of mod_negotiate.c; which keeps doing
>strange things to the variant record;
>
>This is the bit of code
>
>#define DEBUG(x) { printf("mod_neg: "); printf x; printf("\n"); }
>
>void set_encoding_quality(negotiation_state *neg, var_rec *variant)
>{
> int i;
> accept_rec *accept_recs = (accept_rec *)neg->accept_encodings->elts;
> char *enc = variant->content_encoding;
>
> if (!enc || is_identity_encoding(enc)) {
> variant->encoding_quality = 1.0; /* ?? */
>DEBUG(("Exit %f",variant->encoding_quality));
> return;
> };
>
>And this is the debug output
>
> Exit 0.0
>
>I am being braindead; what zaps that value ?!?!???
mod_negotiation.c: int encoding_quality; /* ditto encoding (1 or 0 only
Your compiler should have been smart enough to warn about a float
constant being place in an int.
....Roy