KHTML/CSS patch

Helge Deller deller at gmx.de
Thu Nov 13 19:39:44 GMT 2003


On Thursday 13 November 2003 12:51, Rob Kaper wrote:
> On Tue, Nov 11, 2003 at 02:39:46AM +0100, Helge Deller wrote:
> >  	CachedCSSStyleSheet *requestStyleSheet( const DOM::DOMString &url,
> >     const QString& charset, 
> > -						const char *accept = "text/css"); 
> > +					const char *accept = "text/css, text/*");
> >
> >  	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/*");
>
> Looks okay, but why not add a fallback for */* as well?

Yes. 
Dirk Mueller committed on Tuesday a more generic fix:

--- kdelibs/khtml/misc/loader.cpp  #1.156:1.157
@@ -163,5 +163,9 @@ CachedCSSStyleSheet::CachedCSSStyleSheet
 {
     // Set the type we want (probably css or xml)
-    setAccept( QString::fromLatin1(accept) );
+    QString ah = QString::fromLatin1( accept );
+    if ( ah.length() )
+        ah += ",";
+    ah += "*/*;q=0.1";
+    setAccept( ah );
     m_hadError = false;





More information about the kde-core-devel mailing list