Salut,
Hubert Iwaniuk wrote:
> Hi,
>
> While fixing Grizzly OSGi Http Service to work with Felix WebConsole I
> discovered that Servlet Adapter by default will set Content-Type to
> text/plain if Content-Type was not set. [1]
>
> It is not a MUST by rfc2616 to provide Content-Type, it's SHOULD.
> So if we don't know what's type of entity we could leave it to client to
> discover.
>
> It's also been reported by Compojure developers that if using Jetty
> implementation users don't have to explicetly set Content-Type, because
> browser discovers it fine. [2]
>
> I'm not sure if by changing it we could break something in Glassfish.
> Though I think it has more potential for fixing stuff than breaking.
The value is configurable, so we should configure it to "" for Grizzly,
and leave the default for GlassFish. The default in GlassFish was a
compatibility issue with old appserver distribution that were using the
Netscape Http Runtime (old old old). But in GF we always try to avoid
breaking old version :-)
So go ahead and fix it (or I can take a look).
A+
-- Jeanfrancois
>
> Please let me know what you think of this change proposal.
>
> Thanks,
> Hubert.
>
> [1] https://grizzly.dev.java.net/issues/show_bug.cgi?id=607
> [2] http://groups.google.com/group/compojure/msg/81e36a18319394ac