瀏覽代碼

Merge pull request #115 from antonmes/patch-1

Add "text/plain" header
Damian Kołakowski 10 年之前
父節點
當前提交
e716fd9966
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Sources/HttpResponse.swift

+ 1 - 0
Sources/HttpResponse.swift

@@ -113,6 +113,7 @@ public enum HttpResponse {
             }
         case .OK(let body):
             switch body {
+            case .Text(_)   : headers["Content-Type"] = "text/plain"
             case .Json(_)   : headers["Content-Type"] = "application/json"
             case .Html(_)   : headers["Content-Type"] = "text/html"
             default:break