Hey David,

> The above code is only related to the XHTML render pipeline... stuff that
> goes through Lift's view mechanism.  It would be a Bad Thing (tm) to set
> JSON as the return type in this case as the result is going to be XHTML.
> The reason we've got this particular bit of code is to deal with IE 6/7 (no
> XHTML support and barfs on "application/xhtml+xml" headers but modern
> browsers (FF, Safari, etc.) require the content type to properly render the
> page (not apply some alternative of HTML tag soup to the page.)

Interesting, I didnt know that. Like I said, i've never used it
before :-) My bad!

> More broadly, the content-type must match what is actually being rendered.
>
> In the case of APIs, you will have alternative dispatches to functions that
> are going to render the result *and* set the content-type headers
> appropriately.
>
> I've been noodling on some sort of meta-representation of stuff that could
> be auto-converted into XML or JSON, but the noodling hasn't gone too far.

Right now, how would one set the content type explicitly? I just
remembered you have some API stuff in ESME, so checked what headers
that was outputing, and I get:

timperrett$ curl -I http://www.esme.us/esme/api/status
HTTP/1.1 404 /esme/api/status
Server: nginx/0.6.32
Date: Sun, 09 Nov 2008 14:08:09 GMT
Content-Type: text/html;charset=utf-8
Connection: keep-alive
Set-Cookie: JSESSIONID=21D69EAE40B0B9D703F24FDF619D87CF; Path=/esme
Content-Length: 1000

So, thats obviously wrong. How can we fix this? Im happy to help out
on this as im implementing my entire bloglite application through the
rest api :-) What are your suggestions for a route forward?

Cheers

Tim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to