Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

Commit

Permalink
Fix when the http request has no header fields the parsing of the hea…
Browse files Browse the repository at this point in the history
…der fails
  • Loading branch information
zhuhaow committed Sep 21, 2016
1 parent 5712678 commit 9ca7e00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/Messages/HTTPHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 9ca7e00

Please sign in to comment.