فهرست منبع

[Issue 510] Fixed error where wildcard was failing due to missing response MIME type.

Christian Noon 10 سال پیش
والد
کامیت
e476f96bd6
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      Source/Validation.swift

+ 6 - 0
Source/Validation.swift

@@ -117,6 +117,12 @@ extension Request {
                         return true
                     }
                 }
+            } else {
+                for contentType in acceptableContentTypes {
+                    if let MIMEType = MIMEType(contentType) where MIMEType.type == "*" && MIMEType.subtype == "*" {
+                        return true
+                    }
+                }
             }
 
             return false