Skip to content

Commit 1169214

Browse files
committed
svg content type
1 parent a8301df commit 1169214

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

FlyingFox/Sources/Handlers/FileHTTPHandler.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ public struct FileHTTPHandler: HTTPHandler {
6565
return "image/jpeg"
6666
case "pdf":
6767
return "application/pdf"
68+
case "svg":
69+
return "image/svg+xml"
6870
default:
6971
return "application/octet-stream"
7072
}

FlyingFox/Tests/Handlers/HTTPHandlerTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ final class HTTPHandlerTests: XCTestCase {
141141
FileHTTPHandler.makeContentType(for: "fish.pdf"),
142142
"application/pdf"
143143
)
144+
XCTAssertEqual(
145+
FileHTTPHandler.makeContentType(for: "fish.svg"),
146+
"image/svg+xml"
147+
)
144148
XCTAssertEqual(
145149
FileHTTPHandler.makeContentType(for: "fish.somefile"),
146150
"application/octet-stream"

0 commit comments

Comments
 (0)