Image accept headers

Waldo Bastian bastian at kde.org
Tue Oct 19 17:41:49 BST 2004


I would like to change the accept header for images from

Accept: image/x-dds, image/x-portable-bitmap, image/x-pcx, 
image/x-portable-greymap, image/x-xbm, image/x-xcf-gimp,
image/x-targa, image/x-ico, image/png, image/x-portable-pixmap, image/jpeg, 
image/x-xpm, image/x-eps, image/tiff, video/x-mng,
image/x-bmp, image/jp2, image/x-rgb, image/gif, image/foo;q=0.5,*/*;q=0.1

to

Accept: image/png, image/jpeg, video/x-mng, image/jp2, 
image/gif;q=0.5,*/*;q=0.1

See attached patch. This fixes http://www.n-ergie.de/ which somehow gets 
confused by our (standard compliant but rather long) header. 

Although it's nice to advertise all the image formats that we actually 
support, I don't think many websites give a crap. Apart from the obvious 
ones, I have left video/x-mng and image/jp2 in because I figure that websites 
may actually be interested in those two.

Having a smaller header may help performance, especially if the request would 
otherwise exceed the MTU size. With patch, the request size sits around 380 
bytes, without patch it sits around 620

I notice that we have spaces behind each comma except behind "q=0.5,". Should 
we add a space there as well or get rid of the spaces all together?

Cheers,
Waldo
-- 
bastian at kde.org   |   SUSE LINUX 9.2: Order now!   |   bastian at suse.com
  http://www.suse.de/us/private/products/suse_linux/preview/index.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image_accept_headers.patch
Type: text/x-diff
Size: 813 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20041019/b066be8b/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20041019/b066be8b/attachment.sig>


More information about the kfm-devel mailing list