[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 8.3.4: comma separated?! app:accept
Thomas Broyer wrote:
>> The third line condenses the list to remove any duplicate or more
>> specific equivalent entries (e.g. "image/png, image/*" becomes simply
>> Where's the excess complexity?
> In the fact the above code has a bug.
Yep, that's a known limitation that's been on my todo list for a while.
Given the infrequency in which one finds commas in media type parameter
values, not accounting for that case made sense.
A known limitation != increased complexity.
> For an accurate media-ranges parsing algorithm (it has not yet proven
> to have bugs), look at httplib2.
Note that this code does not parse the media type. It just splits them.
I pass the parsing of the media type off to whatever Java Activation
Framework implementation is available.
Also note that the difficulties in parsing media type params does not go
away when using multiple accept elements.