-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
content type fix #209
content type fix #209
Conversation
|
||
headers["Content-Type"] = Response.Headers.Values(type.description) | ||
} | ||
|
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.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
var headers: Response.Headers = [:] | ||
|
||
if | ||
let fileExtension = filePath.split(byString: ".").last, |
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 always want this to be func split(by string:
? Do we own it
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.
It's from Zewo/String. We can make a PR there.
@@ -1,4 +1,5 @@ | |||
import libc | |||
import MediaType | |||
|
|||
public class Application { | |||
public static let VERSION = "0.5.3" |
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.
Can you please update the version?
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.
Oops, yeah. Looks like we've been forgetting to do that. I'll make an issue for the 0.8 release (milestone).
Deduces content types for a given file extension.
For example:
Fixes #192