dev@grizzly.java.net

Default Content-Type in GWS

From: Hubert Iwaniuk <neotyk_at_kungfoo.pl>
Date: Tue, 19 May 2009 16:00:47 +0200

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.

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