Browse Source

Merge pull request #598 from Alamofire/fix/issue_510_missing_content_type

Christian Noon 10 years ago
parent
commit
a78f0c6715
1 changed files with 6 additions and 0 deletions
  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