Re: Issues loading css files (from a Directory) using Firefox

2009-07-11 Thread Bruce Cooper
Hi Jerome,
I tried the suggestion of changing the default charset in the application,
and that has resolved the issue for me.  Its probably still worthwhile
registering this as an issue on Mac, even though there is a workaround.
 I'll leave it as a TODO in my application, just in case nobody else gets
around to looking at it.

Thanks very much for your help,

Bruce.
--
www.brucecooper.net - 0417 986 274 - www.unico.com.au


2009/7/5 Jerome Louvel jerome.lou...@noelios.com

  Hi Bruce,



 That’s rather unexpected indeed. I’ve checked the text/css media type and
 it does support the charset parameter:

 http://tools.ietf.org/html/rfc2318



 What seems wrong is the name of the character set. Looking at IANA
 registry, the proper name is either “macintosh” or “mac”, but not
 “MACROMAN”:

 http://en.wikipedia.org/wiki/Mac_OS_Roman

 http://www.iana.org/assignments/character-sets



 A test that would be interesting to do is to change the default character
 set to something like UTF-8 to see if this is the value of the character set
 that annoys FireFox. One way to do this is:



 myApp.getMetadataService().setDefaultCharacterSet(CharacterSet.UTF_8);



 BTW, I’ve also added CharacterSet.MACINTOSH constant and default extension
 mappings for character sets in MetadataService (“ascii”, “utf8”, “utf16”,
 “mac”, “win”).



 Best regards,
 Jerome Louvel
 --
 Restlet ~ Founder and Lead developer ~ http://www.restlet.org
 Noelios Technologies ~ Co-founder ~ http://www.noelios.com







 *De :* Bruce Cooper [mailto:br...@brucecooper.net]
 *Envoyé :* dimanche 28 juin 2009 10:38
 *À :* discuss@restlet.tigris.org
 *Objet :* Issues loading css files (from a Directory) using Firefox



 Hi guys,



 I've been using a Directory object to serve up the user interface of my
 REST style application, and that application consists of HTML, javascript
 and CSS.  I've found today that Firefox 3.5 on my Mac was not reading CSS
 files correctly.  To be more specific, it was reading the files, but was not
 using the results that were returned.



 To work out what was going wrong, I wrote a simple test page, which had a
 single DIV with a background color set by a style in an attached style
 sheet.  Viewing the page directly from the disk using Safari or Firefox
 worked.  Viewing the Page when served by Apache worked for both Safari and
 Firefox.  When the files were served up by the restlet engine, it continued
 to work correctly in Safari, but Firefox ignored the stylesheet.  After
 this, I spent a bit of time in Firebug having a look in headers. The main
 difference I could see was that the restlet engine was reporting the
 content-type of the repsonse as



 text/css; charset=MACROMAN



 Whereas Apache was just returning the content type as text/css.



 I've dug around the code and found that in org.restlet.engine.local.Entity
 line 252 it sets the charset of the response to the platform default if it
 hasn't already been set.  To test my theory, I commented out this part of
 the code, and Firefox started responding correctly to the CSS file again (as
 shown in Picture 10).



 I don't know if it is Firefox not understanding the charset or whether it
 just doesn't like the charset at all, but either way it is a problem.  For
 the moment, I'll just be leaving this code commented out, but I would
 appreciate some advice on the best way to fix this.



 Please let me know if you need any more information.



 Bruce.

 --
 www.brucecooper.net - 0417 986 274


--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2370606

RE: Mysterious message in client

2009-07-11 Thread Philip Johnson
I have encountered a similar output message after upgrading to 1.3.6:

INFO: Starting the HTTP client
Jul 10, 2009 10:48:56 AM com.noelios.restlet.ext.net.HttpClientHelper start

In my case, it appears that the name of this logger is global.  

If that is true, I believe this is a bug, as the name of the logger should 
really start with com.noelios. 

Is this reasoning correct? 

Thanks,
Philip Johnson

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2370349


RE: Re: HTML Email

2009-07-11 Thread webpost
I'd love to get that multi-part patch.   Can you post the code?

thanks

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2370212