asp.net-4.6

ASP.Net HTTP2 PushPromise is slow

女生的网名这么多〃 提交于 2019-12-07 13:45:02
问题 I'm trying to implement the Http2 push server functionality using "PushPromise" .NET 4.6.1, for this I have a "html extension" with Razor (we did not implement MVC only used the Razor engine to build the pages). public static IHtmlString PushPromiseStylesheet(this HtmlHelper htmlHelper, string src, bool addDomElement = true) { var context = HttpContext.Current; var path = System.Web.Optimization.Styles.Url(src).ToString(); var headers = new NameValueCollection { { "accept-encoding", context

ASP.Net HTTP2 PushPromise is slow

喜你入骨 提交于 2019-12-06 02:21:14
I'm trying to implement the Http2 push server functionality using "PushPromise" .NET 4.6.1, for this I have a "html extension" with Razor (we did not implement MVC only used the Razor engine to build the pages). public static IHtmlString PushPromiseStylesheet(this HtmlHelper htmlHelper, string src, bool addDomElement = true) { var context = HttpContext.Current; var path = System.Web.Optimization.Styles.Url(src).ToString(); var headers = new NameValueCollection { { "accept-encoding", context.Request.Headers["accept-encoding"] } }; context.Response.PushPromise(path, "GET", headers); var