#70 ✓resolved
Rusty Klophaus

wf:content_type(blah) does not correctly set content type in Inets

Reported by Rusty Klophaus | May 30th, 2010 @ 05:41 PM | in 2.0.1

From Tobbe:

found the problem. I'm using the Inets http server, which has its own format to express
some common
HTTP headers. So this doesn't work:

wf:content_type("text/css")

because, it resolves into Nitrogen calling:

% inside wf:content_type/1 ... response_bridge(Res:header("Content-Type", ContentType)), ...

But Inets want to have 'content_type' has the header name.
Thus, the solution is to use:

wf:header(content_type,"text/css"), % inets wants 'content_type'....

But I guess this will cause problem if I switch from Inets one
day...
So perhaps Nitrogen should do some special massage of the headers in
the inets_response_bridge:build_response/2 when assembling the
headers.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Nitrogen Web Framework for Erlang

People watching this ticket

Pages