Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

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

#70

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.

Reported by Rusty Klophaus · May 30th, 2010 @ 05:41 PM

State: resolved
Milestone: 2.0.1
Assigned to: nobody

Activity

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.