Skip to content
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

Fixing basic MIME types #214

Merged
merged 3 commits into from
Jan 24, 2023
Merged

Fixing basic MIME types #214

merged 3 commits into from
Jan 24, 2023

Conversation

Ellerbach
Copy link
Member

Fixing basic MIME types

Description

Motivation and Context

How Has This Been Tested?

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Unit Tests (add new Unit Test(s) or improved existing one(s), has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist:

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).
  • I have added new tests to cover my changes.

@DaveSchmid
Copy link

@Ellerbach you better rename filename to extension in GetContentTypeFromFileName(string fileName)

@josesimoes
Copy link
Member

Guess this supersedes #213 correct?

Copy link
Member

@josesimoes josesimoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just please remove the changes unrelated with the PR.

@@ -468,7 +468,8 @@ public static void SendFileOverHTTP(HttpListenerResponse response, StorageFile s
/// /// <param name="contentType">The type of file, if empty string, then will use auto detection</param>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"double comment" here

Suggested change
/// /// <param name="contentType">The type of file, if empty string, then will use auto detection</param>
/// <param name="contentType">The type of file, if empty string, then will use auto detection</param>

@@ -371,7 +371,7 @@ public bool Start()
/// <summary>
/// Restart the server.
/// </summary>
private bool Restart()
public bool Restart()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one and the all the others in the comments are unrelated with the PR: fixing the MIME types. Can you please remove them and submit a separate PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, made this one private again, for the rest of the comments, that was breaking my build somehow (warnings are errors)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. So let's have those fixed first and merge the PR into this one.

@sonarcloud
Copy link

sonarcloud bot commented Jan 23, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Ellerbach Ellerbach merged commit 27441ef into main Jan 24, 2023
@Ellerbach Ellerbach deleted the fix-mimetype branch January 24, 2023 10:21
@josesimoes
Copy link
Member

Call me picky, but I would rather have had the fixes for the comments in a separate PR...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebServer - MIME-Type for images not correct
4 participants