Skip to content

Commit 6dc39cd

Browse files
authored
Additional check for header
1 parent 149b9f3 commit 6dc39cd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/sdk/PnP.Core/Services/Core/BatchClient.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,7 +1541,10 @@ private Tuple<string, string> BuildSharePointRestBatchRequestContent(Batch batch
15411541
{
15421542
sb.AppendLine($"{header.Key}: {header.Value}");
15431543
}
1544-
sb.AppendLine($"X-HTTP-Method: DELETE");
1544+
if (!headers.ContainsKey("X-HTTP-Method"))
1545+
{
1546+
sb.AppendLine($"X-HTTP-Method: DELETE");
1547+
}
15451548
if (!headers.ContainsKey("IF-MATCH"))
15461549
{
15471550
sb.AppendLine($"IF-MATCH: *"); // TODO: Here we need the E-Tag or something to specify to use *
@@ -2720,4 +2723,4 @@ private static void AddHttpRequestMessageProperties(HttpRequestMessage request,
27202723
}
27212724
}
27222725
}
2723-
}
2726+
}

0 commit comments

Comments
 (0)