-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More warning fixes #885
More warning fixes #885
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just some minor notes/questions.
@@ -101,7 +118,7 @@ private static async Task StartApp(StartupOptions options) | |||
SQLitePCL.Batteries_V2.Init(); | |||
|
|||
// Allow all https requests | |||
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; }); | |||
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; } ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On an unrelated note, this should be configurable. I believe this is for out going connections, and it's not very good practice to have it as default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But probably also out of scope. It might warrant a //TODO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is a bad practice, should be off by default.
Definitely warrants a TODO at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor suggestions.
} | ||
|
||
long virt = real - offset; | ||
if (virt < 0 || virt > Length) | ||
{ | ||
throw new ArgumentException(); | ||
throw new ArgumentException("Invalid position", nameof(origin)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think bad position should be tied to d
, not origin
here:
throw new ArgumentException("Invalid position", nameof(origin)); | |
throw new ArgumentException("Invalid position", nameof(d)); |
public long Start; | ||
public long Length; | ||
public string ContentType { get; set; } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need empty lines between those? you didn't use them in other files here
} | ||
} | ||
|
||
long start = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
long start = 0; | |
long start = data.Position; |
@@ -107,6 +110,7 @@ internal static string CheckBadChars(string name) | |||
switch (crlf) | |||
{ | |||
case 0: | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why add braces here? they seem to be excessive for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure the the analyzer wanted it.
Co-Authored-By: Bond-009 <bond.009@outlook.com>
No description provided.