httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Comprehension failure
Date Fri, 19 Jul 1996 14:42:44 GMT
I've been looking at this bit of code (from mod_negotiation.c) and I'm puzzled:

	    if (q > best_quality
		|| (q == best_quality
		    && ((variant->mime_stars > best->mime_stars)
			|| (variant->lang_index < best->lang_index
			    || (variant->lang_index == best->lang_index
				&& ((levcmp = level_cmp (variant, best)) == 1
				    || (levcmp == 0
					&& !strcmp (variant->type_name,
						    best->type_name)
					&& (find_content_length(neg, variant)
					    <
				find_content_length(neg, best)))))))))
	    {
		best = variant;
		best_quality = q;
	    }

It looks to me like content lengths are only compared if the type names
match. But would we expect to ever get two variants with the same type name?

Enlightenment, please!

Cheers,

Ben.

-- 
Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email: ben@algroup.co.uk
A.L. Digital Ltd,           URL: http://www.algroup.co.uk
London, England.            Apache Group member (http://www.apache.org)

Mime
View raw message