Changing the defaults for HTTP ACCEPT, ACCEPT-LANGUAGE and USERAGENT headers
Maksim Orlovich
mo85 at cornell.edu
Sun May 8 20:56:57 BST 2011
1) Does this actually fix anything? Did you do any testing?
2) 'like Gecko' was added by Apple guys for a very good reason (UA sniffing)
3) It would be incorrect to add xhtml accepts to khtml's accept-type.
XHTML parsing is buggy, and isn't really worth prioritizing fixing (on
accounts on basically no-one using it)
On 5/8/11, Dawit A <adawit at kde.org> wrote:
> In hopes of making Konqueror's default settings for the aforementioned
> HTTP headers inline with other browsers, I want to change the default
> settings for these three header as outlined below.
>
> ** Please note that this only affects the default! Each and every
> application can tell the ioslave what to use through the KIO meta-data
> system for each one of these parameters.
>
> USER-AGENT HEADER
> =================
> OLD DEFAULT: Mozilla/5.0 (compatible; Konqueror/4.6; Linux)
> KHTML/4.6.41 (like Gecko)
> NEW DEFAULT: Mozilla/5.0 (X11) KHTML/4.6.41 (like Gecko) Konqueror/4.6
>
> OLD Full: Mozilla/5.0 (compatible; Konqueror/4.6; Linux 2.6.31;
> x86-64; en_US) KHTML/4.6.41 (like Gecko)
> NEW Full: Mozilla/5.0 (X11; Linux 2.6.31 x86-64; en_US) KHTML/4.6.41
> (like Gecko) Konqueror/4.6
>
>
> Changes:
> --------------
> - Drop the "U" letter which is a vestige left from the early days of
> Mozilla to denote strong security support. Since all browsers now days
> automatically come with support for this functionality, there is no
> need for such letter. Instead only a "N" will be added when a browser
> is compiled without support for encrypted communication.
>
> - Drop the word "compatible" from the string since it is really
> useless. I would like to drop the "like Gecko" text as well, but I
> have no idea what kind of impact that would have on khtml so I opted
> to leave it alone.
>
> - Other than the above to the only change is to move around the order
> of what is inside the "( )".
>
> ACCEPT HEADER:
> ==============
> OLD: text/html, image/jpeg;q=0.9, image/png;q=0.9, text/*;q=0.9,
> image/*;q=0.9, */*;q=0.8
> NEW: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8
>
> Changes:
> -------------
> - Again this is intended to make the default inline with what Firefox
> and to a large degree Chrome send. Since */*; it is pointless to list
> the other preferences we have. Specially when it comes to images since
> Qt supports a lot of other image formats not listed here equally well.
>
> Only question is whether or not sending anything that has "/xml" in it
> detrimental to khtml ? Just as an FYI, by default, QtWebKit sends this
> same header (the firefox version).
>
> ACCEPT LANGUAGE HEADER:
> ========================
> OLD: utf-8, utf-8;q=0.5, *;q=0.5 (see the duplicate ??)
> NEW: utf-8, *;q=0.5
>
> Changes:
> -------------
> This is a fix more than a change. Currently the language header
> duplicates the utf8 entry by appending the default onto whatever the
> application specified. The fix is to change the code to not do that.
> Instead it will simply append the default *;q=0.5 if it is missing
> from the charset value defined by the application.
>
> Input, suggestion, objections are welcome...
>
> Regards,
> Dawit A.
>
More information about the kde-core-devel
mailing list