Merge branch 'master' into general-devel

This commit is contained in:
Lucas Nicodemus 2013-09-15 15:24:15 -06:00
commit dd05c524ec
2 changed files with 24 additions and 17 deletions

View file

@ -135,6 +135,11 @@ namespace Rests
return;
var str = JsonConvert.SerializeObject(obj, Formatting.Indented);
var jsonp = e.Request.Parameters["jsonp"];
if (!string.IsNullOrWhiteSpace(jsonp))
{
str = string.Format("{0}({1});", jsonp, str);
}
e.Response.Connection.Type = ConnectionType.Close;
e.Response.ContentType = new ContentTypeHeader("application/json");
e.Response.Add(serverHeader);