提交 3fa9f196 编写于 作者: C Christian Noon

Merge branch 'master' into tvOS

Pod::Spec.new do |s|
s.name = 'Alamofire'
s.version = '3.0.0'
s.version = '3.0.1'
s.license = 'MIT'
s.summary = 'Elegant HTTP Networking in Swift'
s.homepage = 'https://github.com/Alamofire/Alamofire'
......
......@@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file.
`Alamofire` adheres to [Semantic Versioning](http://semver.org/).
#### 3.x Releases
- `3.0.x` Releases - [3.0.0](#300)
- `3.0.x` Releases - [3.0.0](#300) | [3.0.1](#301)
- `3.0.0` Betas - [3.0.0-beta.1](#300-beta1) | [3.0.0-beta.2](#300-beta2) | [3.0.0-beta.3](#300-beta3)
#### 2.x Releases
......@@ -18,6 +18,18 @@ All notable changes to this project will be documented in this file.
---
## [3.0.1](https://github.com/Alamofire/Alamofire/releases/tag/3.0.1)
Released on 2015-10-19. All issues associated with this milestone can be found using this
[filter](https://github.com/Alamofire/Alamofire/issues?utf8=✓&q=milestone%3A3.0.1).
#### Added
- Tests around content type validation with accept parameters.
- Added by [Christian Noon](https://github.com/cnoon).
#### Fixed
- Content type validation issue where parameter parsing on `;` was incorrect.
- Fixed by [Christian Noon](https://github.com/cnoon).
## [3.0.0](https://github.com/Alamofire/Alamofire/releases/tag/3.0.0)
Released on 2015-10-10. All issues associated with this milestone can be found using this
[filter](https://github.com/Alamofire/Alamofire/issues?utf8=✓&q=milestone%3A3.0.0).
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.0.0</string>
<string>3.0.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -94,7 +94,7 @@ extension Request {
init?(_ string: String) {
let components: [String] = {
let stripped = string.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet())
let split = stripped.substringToIndex(stripped.rangeOfString(";")?.endIndex ?? stripped.endIndex)
let split = stripped.substringToIndex(stripped.rangeOfString(";")?.startIndex ?? stripped.endIndex)
return split.componentsSeparatedByString("/")
}()
......
......@@ -116,6 +116,8 @@ class ContentTypeValidationTestCase: BaseTestCase {
// When
Alamofire.request(.GET, URLString)
.validate(contentType: ["application/json"])
.validate(contentType: ["application/json;charset=utf8"])
.validate(contentType: ["application/json;q=0.8;charset=utf8"])
.response { _, _, _, responseError in
error = responseError
expectation.fulfill()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册