diff --git a/CHANGELOG.md b/CHANGELOG.md index c915d85b9..30e050e85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. I will do my best to guarantee that this project adheres to [Semantic Versioning](http://semver.org/) after 1.0.0, but please do read change log before updating. +## [0.6.1] +### Fixed +- Fixed a bug when the http request has no header fields the parsing of the header fails. + ## [0.6.0] ### Changed - Updated to Swift 2.3. diff --git a/src/Messages/HTTPHeader.swift b/src/Messages/HTTPHeader.swift index 3c7a2ff28..cb4d0ee82 100644 --- a/src/Messages/HTTPHeader.swift +++ b/src/Messages/HTTPHeader.swift @@ -15,7 +15,7 @@ public class HTTPHeader { public init?(headerString: String) { let lines = headerString.componentsSeparatedByString("\r\n") - guard lines.count > 3 else { + guard lines.count >= 3 else { return nil }