1 write to Response
Microsoft.AspNetCore.Server.HttpSys (1)
RequestProcessing\RequestContext.FeatureCollection.cs (1)
122Response = new Response(this);
66 references to Response
Microsoft.AspNetCore.Server.HttpSys (66)
AuthenticationHandler.cs (2)
26_requestContext!.Response.StatusCode = 401; 32_requestContext!.Response.StatusCode = 403;
AuthenticationManager.cs (3)
181IList<string> challenges = GenerateChallenges(context.Response.AuthenticationChallenges); 185context.Response.Headers[HeaderNames.WWWAuthenticate] 186= StringValues.Concat(context.Response.Headers[HeaderNames.WWWAuthenticate], challenges.ToArray());
RequestProcessing\Request.cs (1)
399public bool CanDelegate => !(HasRequestBodyStarted || RequestContext.Response.HasStarted);
RequestProcessing\RequestContext.cs (14)
47if (_disposed || Response.BodyIsFinished) 97if (Response.HasStarted) 103Response.StatusCode = StatusCodes.Status101SwitchingProtocols; 104Response.ReasonPhrase = HttpReasonPhrase.Get(StatusCodes.Status101SwitchingProtocols); 106Response.SendOpaqueUpgrade(); // TODO: Async 108Response.SwitchToOpaqueMode(); 109var opaqueStream = new OpaqueStream(Request.Body, Response.Body); 131Response.Dispose(); 178Response?.Abort(); 212Response?.CancelLastWrite(); 281Response.StatusCode = status; 282Response.ContentLength = 0; 292if (Response.HasStarted) 326Response.MarkDelegated();
RequestProcessing\RequestContext.FeatureCollection.cs (14)
141_responseStream = new ResponseStream(Response.Body, OnResponseStart); 142_responseHeaders = Response.Headers; 477get { return Response.ReasonPhrase; } 478set { Response.ReasonPhrase = value; } 483get { return Response.StatusCode; } 484set { Response.StatusCode = value; } 490await Response.SendFileAsync(path, offset, length, cancellation); 523Response.Dispose(); 613get => _responseTrailers ??= Response.Trailers; 631Response.Headers.IsReadOnly = true; // Prohibit further modifications. 658Response.CacheTtl = GetCacheTtl(); 664var response = Response; 751if (!Response.HasStarted) 753Response.Headers[HeaderNames.Connection] = "close";
RequestProcessing\RequestContextOfT.cs (5)
71if (Response.HasStarted) 89Response.Headers.IsReadOnly = false; 90Response.Trailers.IsReadOnly = false; 91Response.Headers.Clear(); 92Response.Trailers.Clear();
RequestProcessing\Response.cs (1)
403var statusCanHaveBody = CanSendResponseBody(RequestContext.Response.StatusCode);
RequestProcessing\ResponseBody.cs (26)
121var started = _requestContext.Response.HasStarted; 150statusCode = _requestContext.Response.SendHeaders(ref allocator, dataChunks, null, flags, false); 193var chunked = _requestContext.Response.BoundaryType == BoundaryType.Chunked; 194var addTrailers = endOfRequest && _requestContext.Response.HasTrailers; 265_requestContext.Response.SerializeTrailers(ref allocator, out dataChunks[currentChunk++]); 269_requestContext.Response.MakeTrailersReadOnly(); 327var started = _requestContext.Response.HasStarted; 343var chunked = _requestContext.Response.BoundaryType == BoundaryType.Chunked; 352statusCode = _requestContext.Response.SendHeaders(ref allocator, null, asyncResult, flags, false); 465if (!_requestContext.Response.HasComputedHeaders) 467flags = _requestContext.Response.ComputeHeaders(writeCount, endOfRequest); 475else if (_requestContext.Response.BoundaryType == BoundaryType.ContentLength) 477_leftToWrite = _requestContext.Response.ExpectedBodyLength; 485if (endOfRequest && _requestContext.Response.BoundaryType == BoundaryType.Close) 490&& (_leftToWrite != writeCount || _requestContext.Response.TrailersExpected)) 508if (_leftToWrite == 0 && !_requestContext.Response.TrailersExpected) 511_requestContext.Response.MakeTrailersReadOnly(); 528if (count == 0 && _requestContext.Response.HasStarted) 550var contentLength = _requestContext.Response.ContentLength; 552if (!_requestContext.Response.HasComputedHeaders && contentLength < count) 557else if (_requestContext.Response.HasComputedHeaders && _requestContext.Response.BoundaryType == BoundaryType.ContentLength 580if (count == 0 && _requestContext.Response.HasStarted) 620var started = _requestContext.Response.HasStarted; 666var chunked = _requestContext.Response.BoundaryType == BoundaryType.Chunked; 674statusCode = _requestContext.Response.SendHeaders(ref allocator, null, asyncResult, flags, false);