Now disregarding Content-Type headers in the custom headers box since it was breaking everything.

This commit is contained in:
ruri
2019-05-28 13:13:09 +02:00
parent 180a4d9c14
commit 68102eb6d4
+1 -5
View File
@@ -448,11 +448,7 @@ namespace RuriLib
var replacedKey = key.Replace("-", "").ToLower(); // Used to compare with the HttpHeader enum
var val = ReplaceValues(header.Value, data);
if (replacedKey == "contenttype") // If it's somewhat needed to define Content-Type in e.g. a GET request
{
content = new StringContent("");
content.ContentType = val;
}
if (replacedKey == "contenttype") { } // Disregard additional Content-Type headers
else if (fixedNames.Contains(replacedKey)) request.AddHeader((HttpHeader)Enum.Parse(typeof(HttpHeader), replacedKey, true), val);
else request.AddHeader(key, val);