Skip to content

Commit 028a401

Browse files
committed
fix #139
1 parent 8b5564e commit 028a401

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

Sources/HTTPServer/HTTP.ServerLoop.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,8 @@ extension HTTP.ServerLoop
314314
switch h1.method
315315
{
316316
case .HEAD:
317-
return .resource("Method not allowed", status: 405)
317+
// return .resource("Method not allowed", status: 405)
318+
fallthrough
318319

319320
case .GET:
320321
if let request:IntegralRequest = .init(get: h1.uri,
@@ -460,7 +461,8 @@ extension HTTP.ServerLoop
460461
switch method
461462
{
462463
case "HEAD":
463-
return .resource("Method not allowed", status: 405)
464+
// return .resource("Method not allowed", status: 405)
465+
fallthrough
464466

465467
case "GET":
466468
if let request:IntegralRequest = .init(get: path,

Sources/SwiftinitServer/Administration/Swiftinit.AdminPage.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,9 @@ extension Swiftinit.AdminPage:Swiftinit.AdministrativePage
277277

278278
$0[.dt] = "IP address"
279279
$0[.dd] = "\(last.address)"
280+
281+
$0[.dt] = "Accept Language"
282+
$0[.dd] = last.headers.acceptLanguage ?? "none"
280283
}
281284
if let last:ServerTour.Request = self.tour.lastRequest
282285
{
@@ -290,6 +293,9 @@ extension Swiftinit.AdminPage:Swiftinit.AdministrativePage
290293

291294
$0[.dt] = "IP address"
292295
$0[.dd] = "\(last.address)"
296+
297+
$0[.dt] = "Accept Language"
298+
$0[.dd] = last.headers.acceptLanguage ?? "none"
293299
}
294300

295301
if let query:ServerTour.SlowestQuery = self.tour.slowestQuery

Sources/SwiftinitServer/Server/Swiftinit.ClientAnnotation.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ extension Swiftinit.ClientAnnotation
7171
return .robot(.tool)
7272
}
7373

74-
if case "*"? = headers.acceptLanguage,
75-
agent.starts(with: "Discourse Forum Onebox")
74+
if agent.starts(with: "Discourse Forum Onebox")
7675
{
7776
// This is *probably* the Swift Forums bot.
7877
return .robot(.discoursebot)

TestPackages/swift-malibu/Sources/BarbieCore/documentation/Getting Started.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This article demonstrates how to link to documentation in other modules.
44

5+
Here is an external link to wikipedia: [Wikipedia](https://en.wikipedia.org/wiki/Main_Page)
6+
7+
Here is an external link in autolink form: <https://en.wikipedia.org/wiki/Main_Page>
8+
59
## Codelinks
610

711
You can link to a module with a codelink: ``BarbieCore``.

0 commit comments

Comments
 (0)