Imported Upstream version 5.14.0.141

Former-commit-id: 3b53584824e57e63d7af009d31bd6efb72155c45
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-06-23 17:06:07 +00:00
parent 53f56bd502
commit f87a49ea3f
40 changed files with 41 additions and 42 deletions

View File

@@ -828,7 +828,7 @@ namespace System.Net
WebOperation SendRequest (bool redirecting, BufferOffsetSize writeBuffer, CancellationToken cancellationToken)
{
lock (locker) {
WebConnection.Debug ($"HWR SEND REQUEST: Req={ID} requestSent={requestSent} redirecting={redirecting}");
WebConnection.Debug ($"HWR SEND REQUEST: Req={ID} requestSent={requestSent} actualUri={actualUri} redirecting={redirecting}");
WebOperation operation;
if (!redirecting) {
@@ -1007,14 +1007,14 @@ namespace System.Net
try {
cancellationToken.ThrowIfCancellationRequested ();
WebConnection.Debug ($"HWR GET RESPONSE LOOP: Req={ID} {auth_state.NtlmAuthState}");
WebConnection.Debug ($"HWR GET RESPONSE LOOP: Req={ID} Op={operation?.ID} {auth_state.NtlmAuthState}");
writeStream = await operation.GetRequestStreamInternal ();
await writeStream.WriteRequestAsync (cancellationToken).ConfigureAwait (false);
stream = await operation.GetResponseStream ();
WebConnection.Debug ($"HWR RESPONSE LOOP #0: Req={ID} - {stream?.Headers != null}");
WebConnection.Debug ($"HWR RESPONSE LOOP #0: Req={ID} Op={operation?.ID} - {stream?.Headers != null}");
(response, redirect, mustReadAll, writeBuffer, ntlm) = await GetResponseFromData (
stream, cancellationToken).ConfigureAwait (false);
@@ -1022,7 +1022,7 @@ namespace System.Net
throwMe = GetWebException (e);
}
WebConnection.Debug ($"HWR GET RESPONSE LOOP #1: Req={ID} - redirect={redirect} mustReadAll={mustReadAll} writeBuffer={writeBuffer != null} ntlm={ntlm != null} - {throwMe != null}");
WebConnection.Debug ($"HWR GET RESPONSE LOOP #1: Req={ID} Op={operation?.ID} - redirect={redirect} mustReadAll={mustReadAll} writeBuffer={writeBuffer != null} ntlm={ntlm != null} - {throwMe != null}");
lock (locker) {
if (throwMe != null) {

View File

@@ -336,7 +336,6 @@ namespace System.Net
// Is there anything in the queue?
var next = group.GetNextOperation ();
Debug ($"{me} no pending operations.");
if (next == null)
return false;
@@ -581,9 +580,9 @@ namespace System.Net
public (WebConnection connection, bool created) CreateOrReuseConnection (WebOperation operation, bool force)
{
Scheduler.Debug ($"CREATE OR REUSE: group={ID} OP={operation.ID} force={force}");
Scheduler.Debug ($"CREATE OR REUSE: group={ID} Op={operation.ID} force={force}");
var connection = FindIdleConnection (operation);
Scheduler.Debug ($"CREATE OR REUSE #1: group={ID} OP={operation.ID} force={force} - connection={connection?.ID}");
Scheduler.Debug ($"CREATE OR REUSE #1: group={ID} Op={operation.ID} force={force} - connection={connection?.ID}");
if (connection != null)
return (connection, false);

View File

@@ -658,7 +658,7 @@ namespace System.Net
else
StatusDescription = string.Empty;
if (pos >= buffer.Size)
if (pos >= buffer.Offset)
return true;
}