KHTML/CSS patch

Helge Deller deller at gmx.de
Tue Nov 11 01:39:46 GMT 2003


While tracking down my own bug #67803 (why does konqueror 
not accept the CSS stylesheet?) I found the attached patch
to work for me.
The basic problem is, that Konqueror only would like to accept "text/css" 
type files, while some strange Webservers (IIS) might then report
"HTTP/1.1 406 No acceptable objects were found".

Could someone from the khtml team please verify if this is a
valid fix and if I may commit it ? 
At least it works for me, and maybe it even fixes a few
other webpages/bugreports too.
Please read my comments/analysis in the bugreport before replying.

Helge
 
-------------- next part --------------
Index: kdelibs/khtml/misc/loader.h
===================================================================
RCS file: /home/kde/kdelibs/khtml/misc/loader.h,v
retrieving revision 1.60
diff -u -p -r1.60 loader.h
--- kdelibs/khtml/misc/loader.h	13 Aug 2003 19:47:44 -0000	1.60
+++ kdelibs/khtml/misc/loader.h	11 Nov 2003 01:33:16 -0000
@@ -331,7 +331,7 @@ namespace khtml
 
 	CachedImage *requestImage( const DOM::DOMString &url);
 	CachedCSSStyleSheet *requestStyleSheet( const DOM::DOMString &url, const QString& charset,
-						const char *accept = "text/css");
+						const char *accept = "text/css, text/*");
         CachedScript *requestScript( const DOM::DOMString &url, const QString& charset);
 
 	bool autoloadImages() const { return m_bautoloadImages; }
@@ -445,7 +445,7 @@ namespace khtml
 	 */
 	static CachedCSSStyleSheet *requestStyleSheet( DocLoader* l, const DOM::DOMString &url, bool reload=false,
 						       time_t _expireDate=0, const QString& charset = QString::null,
-						       const char *accept = "text/css");
+						       const char *accept = "text/css, text/*");
 
         /**
          * Pre-loads a stylesheet into the cache.


More information about the kde-core-devel mailing list