Fix launcher crashing on recent mono (Thanks Odd0002)

This commit is contained in:
UnknownShadow200 2018-02-08 15:45:47 +11:00
parent ae15875431
commit cc08683264

View File

@ -227,8 +227,8 @@ namespace ClassicalSharp.Network {
try { try {
HttpWebRequest req = MakeRequest(request); HttpWebRequest req = MakeRequest(request);
using (HttpWebResponse response = (HttpWebResponse)req.GetResponse()) { using (HttpWebResponse response = (HttpWebResponse)req.GetResponse()) {
request.ETag = response.Headers[HttpResponseHeader.ETag]; request.ETag = response.Headers.Get("ETag");
if (response.Headers[HttpResponseHeader.LastModified] != null) { if (response.Headers.Get("Last-Modified") != null) {
request.LastModified = response.LastModified; request.LastModified = response.LastModified;
} }
request.Data = DownloadContent(request, response); request.Data = DownloadContent(request, response);