Skip to content

Commit

Permalink
Merge branch 'stable' into wildcard-end-route
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelenger committed May 16, 2021
2 parents b9e9dd2 + 718f82c commit 6739e9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ All notable changes to this project will be documented in this file. Changes not
# [Unreleased]

## Added
* Add support for using `**` as a catch-all at the end of a route. ([#479](https://github.com/httpswift/swifter/pull/479)) by [@michaelenger](https://github.com/michaelenger)
- Add support for using `**` as a catch-all at the end of a route. ([#479](https://github.com/httpswift/swifter/pull/479)) by [@michaelenger](https://github.com/michaelenger)
- Set `Content-Type` to HttpBody and Text HttpResponse. ([#474](https://github.com/httpswift/swifter/pull/474)) by [@mtgto](https://github.com/mtgto)

## Fixed

Expand Down
3 changes: 2 additions & 1 deletion Xcode/Sources/HttpResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ public enum HttpResponse {
case .ok(let body):
switch body {
case .json: headers["Content-Type"] = "application/json"
case .html: headers["Content-Type"] = "text/html"
case .html, .htmlBody: headers["Content-Type"] = "text/html"
case .text: headers["Content-Type"] = "text/plain"
case .data(_, let contentType): headers["Content-Type"] = contentType
default:break
}
Expand Down

0 comments on commit 6739e9e

Please sign in to comment.