313 references to SR
System.Net.Http (313)
src\libraries\Common\src\System\IO\ReadOnlyMemoryStream.cs (2)
30throw new ObjectDisposedException(null, SR.ObjectDisposed_StreamClosed); 77throw new IOException(SR.IO_SeekBeforeBegin);
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\HPackDecoder.cs (12)
292throw new HPackDecodingException(SR.Format(SR.net_http_invalid_header_name, "")); 372throw new HPackDecodingException(SR.net_http_hpack_late_dynamic_table_size_update); 492throw new HPackDecodingException(SR.net_http_hpack_incomplete_header_block); 538throw new HPackDecodingException(SR.net_http_hpack_unexpected_end); 577throw new HPackDecodingException(SR.Format(SR.net_http_headers_exceeded_length, _maxHeadersLength)); 618throw new HPackDecodingException(SR.net_http_hpack_huffman_decode_failed, ex); 662throw new HPackDecodingException(SR.Format(SR.net_http_hpack_invalid_index, index)); 670throw new HPackDecodingException(SR.Format(SR.net_http_hpack_large_table_size_update, size, _maxDynamicTableSize));
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\HPackEncoder.cs (1)
403throw new HttpRequestException(SR.net_http_request_invalid_char_encoding);
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\Huffman.cs (4)
733throw new HuffmanDecodingException(SR.net_http_hpack_huffman_decode_failed); 776throw new HuffmanDecodingException(SR.net_http_hpack_huffman_decode_failed); 792throw new HuffmanDecodingException(SR.net_http_hpack_huffman_decode_failed); 800throw new HuffmanDecodingException(SR.net_http_hpack_huffman_decode_failed);
src\libraries\Common\src\System\Net\Http\aspnetcore\Http2\Hpack\IntegerDecoder.cs (3)
73throw new HPackDecodingException(SR.net_http_hpack_bad_integer); 81throw new HPackDecodingException(SR.net_http_hpack_bad_integer); 91throw new HPackDecodingException(SR.net_http_hpack_bad_integer);
src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\QPack\QPackDecoder.cs (9)
277throw new QPackDecodingException(SR.Format(SR.net_http_invalid_header_name, "")); 484throw new QPackDecodingException(SR.Format(SR.net_http_invalid_header_name, "")); 586throw new QPackDecodingException(SR.net_http_hpack_incomplete_header_block); 621throw new QPackDecodingException(SR.Format(SR.net_http_headers_exceeded_length, _maxHeadersLength)); 662throw new QPackDecodingException(SR.net_http_hpack_huffman_decode_failed, ex); 754throw new QPackDecodingException(SR.net_http_qpack_no_dynamic_table);
src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\QPack\QPackEncoder.cs (1)
309throw new QPackEncodingException(SR.net_http_request_invalid_char_encoding);
System\Net\Http\DelegatingHandler.cs (2)
78throw new InvalidOperationException(SR.net_http_operation_started); 88throw new InvalidOperationException(SR.net_http_handler_not_assigned);
System\Net\Http\EmptyReadStream.cs (1)
34public override void Write(ReadOnlySpan<byte> buffer) => throw new NotSupportedException(SR.net_http_content_readonly_stream);
System\Net\Http\Headers\ByteArrayHeaderParser.cs (2)
52if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, SR.Format(SR.net_http_parser_invalid_base64_string, base64String, e.Message));
System\Net\Http\Headers\ContentDispositionHeaderValue.cs (2)
407throw new ArgumentException(SR.Format(CultureInfo.InvariantCulture, 408SR.net_http_headers_invalid_value, input));
System\Net\Http\Headers\HeaderUtilities.cs (8)
138if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, SR.Format(SR.net_http_log_headers_invalid_quality, qualityParameter.Value)); 149throw new FormatException(SR.Format(CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, value)); 160throw new FormatException(SR.Format(CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, value)); 171throw new FormatException(SR.Format(CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, value));
System\Net\Http\Headers\HttpHeaderParser.cs (2)
61throw new FormatException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value,
System\Net\Http\Headers\HttpHeaders.cs (12)
239throw new InvalidOperationException(SR.net_http_headers_not_found); 804if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(null, SR.Format(SR.net_http_log_headers_no_newlines, descriptor.Name, rawValue)); 1002throw new InvalidOperationException(SR.Format(SR.net_http_headers_not_allowed_header_name, descriptor.Name)); 1030throw new FormatException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_single_value_header, descriptor.Name)); 1081throw new FormatException(SR.Format(SR.net_http_headers_invalid_header_name, name)); 1093throw new InvalidOperationException(SR.Format(SR.net_http_headers_not_allowed_header_name, name)); 1132throw new FormatException(SR.net_http_headers_no_newlines);
System\Net\Http\Headers\HttpHeadersNonValidated.cs (1)
51throw new KeyNotFoundException(SR.net_http_headers_not_found);
System\Net\Http\Headers\HttpHeaderValueCollection.cs (2)
105throw new ArgumentException(SR.net_http_copyto_array_too_small); 119throw new ArgumentException(SR.net_http_copyto_array_too_small);
System\Net\Http\Headers\HttpRequestHeaders.cs (1)
119throw new FormatException(SR.net_http_headers_invalid_host_header);
System\Net\Http\Headers\MediaTypeHeaderValue.cs (2)
284throw new FormatException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, mediaType));
System\Net\Http\Headers\NameValueHeaderValue.cs (2)
380throw new FormatException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, value));
System\Net\Http\Headers\ProductInfoHeaderValue.cs (2)
91throw new FormatException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, input.Substring(index)));
System\Net\Http\Headers\RangeItemHeaderValue.cs (1)
25throw new ArgumentException(SR.net_http_headers_invalid_range);
System\Net\Http\Headers\ViaHeaderValue.cs (2)
264throw new FormatException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, receivedBy));
System\Net\Http\Headers\WarningHeaderValue.cs (2)
299throw new FormatException(SR.Format(SR.net_http_headers_invalid_value, agent));
System\Net\Http\HttpClient.cs (10)
89throw new ArgumentException(SR.net_http_client_absolute_baseaddress_required, nameof(value)); 124SR.Format(System.Globalization.CultureInfo.InvariantCulture, 125SR.net_http_content_buffersize_limit, HttpContent.MaxBufferSize)); 576throw new InvalidOperationException(SR.net_http_handler_noresponse); 613e = toThrow = new TaskCanceledException(SR.Format(SR.net_http_request_timedout, _timeout.TotalSeconds), new TimeoutException(e.Message, e), oce.CancellationToken); 736throw new InvalidOperationException(SR.net_http_operation_started); 744throw new InvalidOperationException(SR.net_http_client_request_already_sent); 753throw new InvalidOperationException(SR.net_http_client_invalid_requesturi); 766throw new InvalidOperationException(SR.net_http_client_invalid_requesturi);
System\Net\Http\HttpClientHandler.cs (4)
236SR.Format(CultureInfo.InvariantCulture, SR.net_http_content_buffersize_limit, 288throw new InvalidOperationException(SR.Format(SR.net_http_invalid_enable_first, nameof(ClientCertificateOptions), nameof(ClientCertificateOption.Manual)));
System\Net\Http\HttpContent.cs (10)
201throw new InvalidOperationException(SR.net_http_content_invalid_charset, e); 267throw new HttpRequestException(SR.net_http_content_read_as_stream_has_task); 338throw new NotSupportedException(SR.Format(SR.net_http_missing_sync_implementation, GetType(), nameof(HttpContent), nameof(SerializeToStream))); 612SR.Format(CultureInfo.InvariantCulture, 613SR.net_http_content_buffersize_limit, HttpContent.MaxBufferSize)); 696var e = new InvalidOperationException(SR.net_http_content_no_task_returned); 724return new HttpRequestException(error, SR.net_http_content_stream_copy_error, e); 839return new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(CultureInfo.InvariantCulture, SR.net_http_content_buffersize_exceeded, maxBufferSize));
System\Net\Http\HttpMessageHandler.cs (2)
24throw new NotSupportedException(SR.Format(SR.net_http_missing_sync_implementation, GetType(), nameof(HttpMessageHandler), nameof(Send)));
System\Net\Http\HttpMethod.cs (1)
34throw new FormatException(SR.net_http_httpmethod_format_error);
System\Net\Http\HttpProtocolException.cs (8)
41string message = SR.Format(SR.net_http_http2_stream_error, GetName(protocolError), ((int)protocolError).ToString("x")); 47message = SR.Format(message ?? SR.net_http_http2_connection_error, GetName(protocolError), ((int)protocolError).ToString("x")); 53string message = SR.Format(SR.net_http_http3_stream_error, GetName(protocolError), ((int)protocolError).ToString("x")); 59message = SR.Format(message ?? SR.net_http_http3_connection_error, GetName(protocolError), ((int)protocolError).ToString("x"));
System\Net\Http\HttpResponseMessage.cs (4)
95throw new FormatException(SR.net_http_reasonphrase_format_error); 166SR.Format( 168string.IsNullOrWhiteSpace(ReasonPhrase) ? SR.net_http_message_not_success_statuscode : SR.net_http_message_not_success_statuscode_reason,
System\Net\Http\MessageProcessingHandler.cs (1)
80sendState.TrySetException(ExceptionDispatchInfo.SetCurrentStackTrace(new InvalidOperationException(SR.net_http_handler_noresponse)));
System\Net\Http\MultipartContent.cs (6)
77SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_content_field_too_long, 70)); 82throw new ArgumentException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, boundary), nameof(boundary)); 87throw new ArgumentException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, boundary), nameof(boundary));
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs (2)
214throw new HttpRequestException(HttpRequestError.UserAuthenticationError, SR.Format(SR.net_http_authvalidationfailure, statusCode), statusCode: HttpStatusCode.Unauthorized);
System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs (10)
76throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, _chunkBytesRemaining)); 192throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, _chunkBytesRemaining)); 335throw new HttpIOException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_chunk_header_invalid, BitConverter.ToString(currentLine.ToArray()))); 389throw new HttpIOException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_chunk_terminator_invalid, Encoding.ASCII.GetString(currentLine))); 452throw new HttpIOException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_chunk_extension_invalid, BitConverter.ToString(lineAfterChunkSize.ToArray())));
System\Net\Http\SocketsHttpHandler\ConnectHelper.cs (1)
92HttpRequestException ex = new HttpRequestException(HttpRequestError.SecureConnectionError, SR.net_http_ssl_connection_failed, e);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (12)
466HttpRequestException exception = new(HttpRequestError.ExtendedConnectNotSupported, SR.net_unsupported_extended_connect); 533throw new HttpRequestException(HttpRequestError.VersionNegotiationError, SR.Format(SR.net_http_requested_version_server_refused, request.Version, request.VersionPolicy), e); 659stream = await streamTask.ConfigureAwait(false) ?? throw new HttpRequestException(SR.net_http_null_from_connect_callback); 746throw new HttpRequestException(SR.net_http_exception_during_plaintext_filter, e); 752throw new HttpRequestException(SR.net_http_null_from_plaintext_filter); 774throw new HttpRequestException(HttpRequestError.ProxyTunnelError, SR.Format(SR.net_http_proxy_tunnel_returned_failure_status_code, _proxyUri, (int)tunnelResponse.StatusCode)); 801throw new HttpRequestException(HttpRequestError.ProxyTunnelError, SR.net_http_proxy_tunnel_error, e); 813TimeoutException te = new TimeoutException(SR.net_http_connect_timedout, oce.InnerException); 824HttpRequestException ex = new(HttpRequestError.VersionNegotiationError, SR.Format(SR.net_http_requested_version_cannot_establish, request.Version, request.VersionPolicy, desiredVersion), inner);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http2.cs (4)
201connectionException = new HttpRequestException(SR.Format(SR.net_ssl_http2_requires_tls12, sslStream.SslProtocol)); 265throw new HttpRequestException(SR.net_http_client_execution_error, e); 477HttpRequestException hre = new HttpRequestException(SR.net_http_http2_connection_not_established);
System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs (4)
41throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, _contentBytesRemaining)); 103throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, _contentBytesRemaining));
System\Net\Http\SocketsHttpHandler\ContentLengthWriteStream.cs (4)
28throw new HttpRequestException(SR.net_http_content_write_larger_than_content_length); 42return ValueTask.FromException(new HttpRequestException(SR.net_http_content_write_larger_than_content_length)); 54return Task.FromException(new HttpRequestException(SR.Format(SR.net_http_request_content_length_mismatch, BytesWritten, _contentLength)));
System\Net\Http\SocketsHttpHandler\CreditWaiter.cs (1)
83_source.SetException(ExceptionDispatchInfo.SetCurrentStackTrace(new ObjectDisposedException(nameof(CreditManager), SR.net_http_disposed_while_in_use)));
System\Net\Http\SocketsHttpHandler\DecompressionHandler.cs (1)
168throw new InvalidOperationException(SR.net_http_content_stream_already_read);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (15)
249throw new IOException(SR.net_http_http2_connection_not_established, e); 463throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, requiredBytes - _incomingBuffer.ActiveLength)); 466throw new HttpIOException(HttpRequestError.ResponseEnded, SR.net_http_invalid_response_missing_frame); 483ThrowProtocolError(errorCode, SR.net_http_http2_connection_close); 505InitialSettingsReceived.TrySetException(new HttpIOException(HttpRequestError.InvalidResponse, SR.net_http_http2_connection_not_established, e)); 507throw new HttpIOException(HttpRequestError.InvalidResponse, SR.net_http_http2_connection_not_established, e); 1073Exception resetException = HttpProtocolException.CreateHttp2ConnectionException(errorCode, SR.net_http_http2_connection_close); 1571throw new HttpRequestException(SR.Format(SR.net_http_request_headers_exceeded_length, maxHeaderListSize)); 1593ThrowRetry(SR.net_http_server_shutdown); 1600ThrowRetry(SR.net_http_request_aborted); 2066throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_client_execution_error, e); 2140ThrowProtocolError(Http2ProtocolErrorCode.ProtocolError, SR.net_ping_request_timed_out); 2166innerException as HttpIOException ?? new IOException(SR.net_http_request_aborted, innerException);
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (21)
232throw new HttpRequestException(SR.Format(SR.net_http_request_content_length_mismatch, writeStream.BytesWritten, writeStream.ContentLength)); 560throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response); 583throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response); 609throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _connection._pool.Settings.MaxResponseHeadersByteLength)); 631throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response_multiple_status_codes); 638throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response_pseudo_header_in_trailer); 701throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response); 745throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response); 754throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_name, Encoding.ASCII.GetString(name))); 1019ThrowRetry(SR.net_http_request_aborted, resetException); 1340ThrowRetry(SR.net_http_request_aborted, resetException); 1504public override void Write(ReadOnlySpan<byte> buffer) => throw new NotSupportedException(SR.net_http_content_readonly_stream); 1506public override ValueTask WriteAsync(ReadOnlyMemory<byte> destination, CancellationToken cancellationToken) => ValueTask.FromException(new NotSupportedException(SR.net_http_content_readonly_stream)); 1523public override int Read(Span<byte> buffer) => throw new NotSupportedException(SR.net_http_content_writeonly_stream); 1525public override ValueTask<int> ReadAsync(Memory<byte> buffer, CancellationToken cancellationToken) => ValueTask.FromException<int>(new NotSupportedException(SR.net_http_content_writeonly_stream)); 1527public override void CopyTo(Stream destination, int bufferSize) => throw new NotSupportedException(SR.net_http_content_writeonly_stream); 1529public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken) => Task.FromException(new NotSupportedException(SR.net_http_content_writeonly_stream)); 1537return ValueTask.FromException(new HttpRequestException(SR.net_http_content_write_larger_than_content_length));
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (6)
213throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_request_aborted, null, RequestRetryType.RetryOnConnectionFailure); 226throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_request_aborted, null, RequestRetryType.RetryOnConnectionFailure); 242throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_client_execution_error, _abortException, RequestRetryType.RetryOnConnectionFailure); 401Abort(HttpProtocolException.CreateHttp3ConnectionException(code, SR.net_http_http3_connection_close)); 462Abort(HttpProtocolException.CreateHttp3ConnectionException(code, SR.net_http_http3_connection_close)); 597Abort(HttpProtocolException.CreateHttp3ConnectionException(code, SR.net_http_http3_connection_close));
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (32)
255throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_retry_on_older_version, ex, RequestRetryType.RetryOnLowerHttpVersion); 260throw new HttpRequestException(HttpRequestError.HttpProtocolError, SR.net_http_request_aborted, rejectedException, RequestRetryType.RetryOnConnectionFailure); 266throw new HttpRequestException(httpRequestError, SR.net_http_client_execution_error, innerException); 275Exception abortException = _connection.Abort(HttpProtocolException.CreateHttp3ConnectionException(code, SR.net_http_http3_connection_close)); 276throw new HttpRequestException(HttpRequestError.HttpProtocolError, SR.net_http_client_execution_error, abortException); 285throw new HttpRequestException(httpRequestError, SR.net_http_client_execution_error, _connection.AbortException); 299throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_request_aborted, ex, RequestRetryType.RetryOnConnectionFailure); 305throw new HttpRequestException(ex.HttpRequestError, SR.net_http_client_execution_error, ex); 310throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response, ex); 315throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_client_execution_error, ex); 327throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_client_execution_error, ex); 364throw new HttpIOException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response); 427throw new HttpRequestException(SR.Format(SR.net_http_request_content_length_mismatch, sent, contentLength)); 468throw new HttpRequestException(SR.net_http_content_write_larger_than_content_length); 550throw new HttpIOException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response); 676throw new HttpRequestException(SR.Format(SR.net_http_request_headers_exceeded_length, maxHeaderListSize)); 834throw new HttpIOException(HttpRequestError.ResponseEnded, SR.net_http_invalid_response_premature_eof); 878throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _connection.Pool.Settings.MaxResponseHeadersByteLength)); 897throw new HttpIOException(HttpRequestError.ResponseEnded, SR.net_http_invalid_response_premature_eof); 919throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_name, Encoding.ASCII.GetString(name))); 1157throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, _responseDataPayloadRemaining)); 1229throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, _responseDataPayloadRemaining)); 1269HttpProtocolException exception = HttpProtocolException.CreateHttp3ConnectionException((Http3ErrorCode)e.ApplicationErrorCode.Value, SR.net_http_http3_connection_close); 1278throw new HttpRequestException(httpRequestError, SR.net_http_client_execution_error, _connection.AbortException); 1292throw new HttpIOException(HttpRequestError.Unknown, SR.net_http_client_execution_error, new HttpRequestException(SR.net_http_client_execution_error, ex));
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (27)
286throw new HttpRequestException(SR.net_http_request_no_host); 493throw new HttpRequestException(SR.net_http_request_invalid_char_encoding); 620throw new HttpIOException(HttpRequestError.ResponseEnded, SR.net_http_invalid_response_premature_eof); 886mappedException = new HttpRequestException(SR.net_http_client_execution_error, exception); 895mappedException = new HttpRequestException(error, SR.net_http_client_execution_error, ioe, _canRetry ? RequestRetryType.RetryOnConnectionFailure : RequestRetryType.NoRetry); 1027throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_line, Encoding.ASCII.GetString(line))); 1048throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_line, Encoding.ASCII.GetString(line))); 1056throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_code, Encoding.ASCII.GetString(line.Slice(9, 3)))); 1081throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_reason, Encoding.ASCII.GetString(reasonBytes.ToArray())), formatEx); 1087throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_line, Encoding.ASCII.GetString(line))); 1186throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_line, Encoding.ASCII.GetString(buffer.Slice(0, newLineIndex)))); 1285throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_name, "")); 1288throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_name, Encoding.ASCII.GetString(name))); 1292throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _pool.Settings.MaxResponseHeadersByteLength)); 1580throw new HttpRequestException(SR.net_http_chunk_too_large); 1615throw new HttpIOException(HttpRequestError.ResponseEnded, SR.net_http_invalid_response_premature_eof); 2035throw new HttpRequestException(HttpRequestError.UserAuthenticationError, SR.net_http_authconnectionfailure); 2051throw new HttpRequestException(HttpRequestError.UserAuthenticationError, SR.net_http_authconnectionfailure);
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (2)
165throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_code, Encoding.ASCII.GetString(value)));
System\Net\Http\SocketsHttpHandler\HttpConnectionPoolManager.cs (1)
412throw new NotSupportedException(SR.net_http_invalid_proxy_scheme);
System\Net\Http\SocketsHttpHandler\HttpConnectionResponseContent.cs (1)
29throw new InvalidOperationException(SR.net_http_content_stream_already_read);
System\Net\Http\SocketsHttpHandler\HttpContentReadStream.cs (1)
23public sealed override void Write(ReadOnlySpan<byte> buffer) => throw new NotSupportedException(SR.net_http_content_readonly_stream);
System\Net\Http\SocketsHttpHandler\RawConnectionStream.cs (2)
155throw new IOException(SR.ObjectDisposed_StreamClosed); 174return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new IOException(SR.ObjectDisposed_StreamClosed)));
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (18)
31throw new InvalidOperationException(SR.net_http_operation_started); 284string message = SR.Format( 285SR.net_http_http2_invalidinitialstreamwindowsize, 313throw new ArgumentOutOfRangeException(nameof(value), value, SR.Format(SR.net_http_value_must_be_greater_than_or_equal, value, TimeSpan.FromSeconds(1))); 338throw new ArgumentOutOfRangeException(nameof(value), value, SR.Format(SR.net_http_value_must_be_greater_than_or_equal, value, TimeSpan.FromSeconds(1))); 565throw new NotSupportedException(SR.Format(SR.net_http_http2_sync_not_supported, GetType())); 571throw new NotSupportedException(SR.Format(SR.net_http_upgrade_not_enabled_sync, nameof(Send), request.VersionPolicy)); 615return new NotSupportedException(SR.net_http_unsupported_version); 623return new HttpRequestException(SR.net_http_client_execution_error, 624new InvalidOperationException(SR.net_http_chunked_not_allowed_with_empty_content)); 642return new NotSupportedException(SR.net_http_unsupported_chunking); 655return new InvalidOperationException(SR.net_http_client_invalid_requesturi); 660return new NotSupportedException(SR.Format(SR.net_http_unsupported_requesturi_scheme, requestUri.Scheme));
System\Net\Http\SocketsHttpHandler\SocksHelper.cs (15)
113throw new SocksException(SR.net_socks_auth_required); 136throw new SocksException(SR.net_socks_auth_failed); 142throw new SocksException(SR.net_socks_no_auth_method); 195throw new SocksException(SR.net_socks_connection_failed); 202_ => throw new SocksException(SR.net_socks_bad_address_type) 242throw new SocksException(SR.net_socks_ipv6_notsupported); 257throw new SocksException(SR.net_socks_no_ipv4_address, ex); 262throw new SocksException(SR.net_socks_no_ipv4_address); 308throw new SocksException(SR.net_socks_auth_failed); 310throw new SocksException(SR.net_socks_connection_failed); 329throw new SocksException(SR.Format(SR.net_socks_string_too_long, parameterName)); 337throw new SocksException(SR.Format(SR.net_socks_unexpected_version, expected, version)); 362throw new IOException(SR.net_http_invalid_response_premature_eof);
System\Net\Http\StreamContent.cs (11)
132throw new InvalidOperationException(SR.net_http_content_stream_already_read); 160throw new NotSupportedException(SR.net_http_content_readonly_stream); 163throw new NotSupportedException(SR.net_http_content_readonly_stream); 166throw new NotSupportedException(SR.net_http_content_readonly_stream); 169throw new NotSupportedException(SR.net_http_content_readonly_stream); 172throw new NotSupportedException(SR.net_http_content_readonly_stream); 175throw new NotSupportedException(SR.net_http_content_readonly_stream); 178throw new NotSupportedException(SR.net_http_content_readonly_stream); 181throw new NotSupportedException(SR.net_http_content_readonly_stream); 185get => throw new InvalidOperationException(SR.net_http_content_readonly_stream); 186set => throw new InvalidOperationException(SR.net_http_content_readonly_stream);