Last modified: 2010-05-15 15:54:52 UTC
If the Accept header passed to wfAcceptToPrefs() contains spaces the resulting list of mime types will have spaces at the beginning of each type. They should be trimmed.
I was given SVN commit access a while ago, but have never done anything with it. I'm happy to commit this tiny change if folks think it's worth while.
adding self to the cc list
Created attachment 4926 [details]
one line patch to add trim()
Tabs, not spaces. :) Can't comment on the patch itself, I don't know why/whether these need to be trimmed.
Well, the reason why the extra whitespace would need to be trimmed is that as it is the array output by wfAcceptToPrefs() won't work as the input to wfNegotiateType(), specifically with the Accepts header sent by Konqueror. The array looks something like this (pseudo code):
"text/html" => 1,
" text/plain" => 1,
" image/*" => 1
note the extra spaces. If wfNegotiateType() tries to match this with a list of mime types from somewhere else it won't work, because the extra spaces mean that the first part of the mime type doesn't match.
Fixed in r35509.