Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public override async Task WriteToStreamAsync(Type type, object value, Stream st
{
// the /**/ is a specific security mitigation for "Rosetta Flash JSONP abuse"
// the typeof check is just to reduce client error noise
writer.Write("/**/ typeof " + _callback + " === 'function' && " + _callback + "(");
writer.Write("/**/typeof {0}==='function'&&{0}(", _callback ?? _callbackQueryParameter);
writer.Flush();
await _jsonMediaTypeFormatter.WriteToStreamAsync(type, value, stream, content, transportContext);
writer.Write(");");
Expand Down