Skip to content

Commit

Permalink
Updated dependencies to fixed URI (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
czechboy0 committed May 6, 2016
1 parent e9cfb52 commit 53805b4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DEVELOPMENT-SNAPSHOT-2016-04-25-a
DEVELOPMENT-SNAPSHOT-2016-05-03-a
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PackageDescription
let package = Package(
name: "HTTPSerializer",
dependencies: [
.Package(url: "https://github.com/open-swift/S4.git", majorVersion: 0, minor: 5),
.Package(url: "https://github.com/open-swift/S4.git", majorVersion: 0, minor: 6),
.Package(url: "https://github.com/Zewo/URI.git", majorVersion: 0, minor: 7)
]
)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import PackageDescription

let package = Package(
dependencies: [
.Package(url: "https://github.com/Zewo/HTTPSerializer.git", majorVersion: 0, minor: 6)
.Package(url: "https://github.com/Zewo/HTTPSerializer.git", majorVersion: 0, minor: 7)
]
)
```
Expand Down
3 changes: 2 additions & 1 deletion Sources/RequestSerializer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@
// SOFTWARE.

@_exported import S4
import URI

public struct RequestSerializer: S4.RequestSerializer {
public init() {}

public func serialize(_ request: Request, to transport: Stream) throws {
let newLine: Data = [13, 10]

try transport.send("\(request.method) \(request.uri) HTTP/\(request.version.major).\(request.version.minor)".data)
try transport.send("\(request.method) \(request.uri.percentEncoded()) HTTP/\(request.version.major).\(request.version.minor)".data, timingOut: .never)
try transport.send(newLine)

for (name, values) in request.headers.headers {
Expand Down

0 comments on commit 53805b4

Please sign in to comment.