private void WriteStatus(Http2Stream stream, int statusCode, bool final) { var headers = new HeadersList { new KeyValuePair <string, string>(":status", statusCode.ToString()), }; stream.WriteHeadersFrame(headers, final); }
/// <summary> /// Writes the status header to the stream. /// </summary> /// <param name="final">if set to <c>true</c> then marks headers frame as final.</param> private void SendHeaders(bool final) { var responseHeaders = new HeadersList(_responseHeaders) { new KeyValuePair <string, string>(CommonHeaders.Status, _owinContext.Response.StatusCode.ToString(CultureInfo.InvariantCulture)) }; _protocolStream.WriteHeadersFrame(responseHeaders, final, true); }
/// <summary> /// Writes the status header to the stream. /// </summary> /// <param name="stream">The stream.</param> /// <param name="statusCode">The status code.</param> /// <param name="final">if set to <c>true</c> then marks headers frame as final.</param> /// <param name="headers">Additional headers</param> private void WriteStatus(Http2Stream stream, int statusCode, bool final, HeadersList headers = null) { if (headers == null) { headers = new HeadersList(); } headers.Add(new KeyValuePair <string, string>(CommonHeaders.Status, statusCode.ToString(CultureInfo.InvariantCulture))); stream.WriteHeadersFrame(headers, final, true); }