Skip to content

Commit 850c62a

Browse files
committed
Merge branch 'develop'
2 parents 79662fa + d34ea9c commit 850c62a

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

.github/workflows/swift.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- swift:5.2.5-xenial
1717
- swift:5.3.2-xenial
1818
- swift:5.3.2-bionic
19+
- swift:5.5.0-focal
1920
container: ${{ matrix.image }}
2021
steps:
2122
- name: Checkout Repository
@@ -30,7 +31,7 @@ jobs:
3031
- name: Select latest available Xcode
3132
uses: maxim-lobanov/[email protected]
3233
with:
33-
xcode-version: 12.2
34+
xcode-version: 13
3435
- name: Checkout Repository
3536
uses: actions/checkout@v2
3637
- name: Build Swift Debug Package

Package.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import PackageDescription
44

55
let package = Package(
6-
6+
77
name: "MacroExamples",
88

99
platforms: [
@@ -25,11 +25,11 @@ let package = Package(
2525
// A lot of packages for demonstration purposes, only add what you
2626
// actually need in your own project.
2727
.package(url: "https://github.com/Macro-swift/Macro.git",
28-
from: "0.8.10"),
28+
from: "0.8.11"),
2929
.package(url: "https://github.com/Macro-swift/MacroExpress.git",
30-
from: "0.8.6"),
30+
from: "0.8.8"),
3131
.package(url: "https://github.com/Macro-swift/MacroLambda.git",
32-
from: "0.4.0"),
32+
from: "0.4.1"),
3333
.package(url: "https://github.com/AlwaysRightInstitute/cows",
3434
from: "1.0.7")
3535
],

Sources/httpproxy/main.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ http.createServer { req, res in
77
// log request
88
req.log.log("\(req.method) \(req.url)")
99

10+
guard req.method != "CONNECT" else {
11+
req.log.error("Connect not supported.")
12+
res.writeHead(501)
13+
res.end()
14+
return
15+
}
1016
guard let url = URL(string: req.url),
1117
let scheme = url.scheme, let host = url.host else
1218
{
@@ -42,7 +48,7 @@ http.createServer { req, res in
4248
}
4349

4450
// Send the request body to the target server
45-
_ = req.pipe(proxiedRequest)
51+
req.pipe(proxiedRequest)
4652
}
4753
.listen(1337) { server in
4854
server.log.log("Server listening on http://0.0.0.0:1337/")

0 commit comments

Comments
 (0)