private void ResponseWrite(HttpResponse response, MediaTypeHeaderValue contentType, long size, string content, HttpContext httpContext) { var webBody = new WebBody(); ProcessBody(webBody, contentType, size, content); // TODO: TOTOAL HACK!!! need to find a better way of doing this. httpContext.Items.Add("__GlimpseCoreWebBody", webBody); // TODO: need to build message //_broker.SendMessage(message); }
private void ProcessBody(WebBody webBody, MediaTypeHeaderValue contentType, long size, string content) { webBody.Encoding = contentType?.Encoding?.WebName; webBody.Content = content; webBody.Size = size; if (!string.IsNullOrEmpty(webBody.Content) && webBody.Content.Length > MaxBodySize) { webBody.Content = webBody.Content.Substring(0, MaxBodySize); webBody.IsTruncated = true; } }
/// <summary> /// /// </summary> /// <param name="name">name value</param> /// <param name="web">web info</param> public ExtensionAttribute(string name, WebBody web) { this.Type = 1; this.Name = name; this.Web = web; }