Skip to content

Commit 743217e

Browse files
committed
Fix spelling
1 parent 223ff64 commit 743217e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const WebSocket = require("ws")
4646
await server.register(HAPIWebSocket)
4747
await server.register(HAPIAuthBasic)
4848

49-
/* register Basic authentication stategy */
49+
/* register Basic authentication strategy */
5050
server.auth.strategy("basic", "basic", {
5151
validate: async (request, username, password, h) => {
5252
let isValid = false

hapi-plugin-websocket.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ const register = async (server, pluginOptions) => {
132132
/* establish a WebSocket server and attach it to the
133133
Node HTTP server underlying the HAPI server */
134134
wss = new WS.Server({
135-
/* the underyling HTTP server */
135+
/* the underlying HTTP server */
136136
server: server.listener,
137137

138138
/* disable per-server client tracking, as we have to perform it per-route */
@@ -238,7 +238,7 @@ const register = async (server, pluginOptions) => {
238238
/* any HTTP redirection, client error or server error response
239239
leads to an immediate WebSocket connection drop */
240240
if (response.statusCode >= 300) {
241-
const annotation = `(HAPI handler reponded with HTTP status ${response.statusCode})`
241+
const annotation = `(HAPI handler responded with HTTP status ${response.statusCode})`
242242
if (response.statusCode < 400)
243243
ws.close(1002, `Protocol Error ${annotation}`)
244244
else if (response.statusCode < 500)
@@ -292,7 +292,7 @@ const register = async (server, pluginOptions) => {
292292
})
293293
}
294294
else {
295-
/* plain WebSocket communication (uncorrelated request/reponse) */
295+
/* plain WebSocket communication (uncorrelated request/response) */
296296
ws.on("message", async (message) => {
297297
/* inject incoming WebSocket message as a simulated HTTP request */
298298
const response = await server.inject({

sample-server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const WebSocket = require("ws")
1313
await server.register(HAPIWebSocket)
1414
await server.register(HAPIAuthBasic)
1515

16-
/* register Basic authentication stategy */
16+
/* register Basic authentication strategy */
1717
server.auth.strategy("basic", "basic", {
1818
validate: async (request, username, password, h) => {
1919
let isValid = false

0 commit comments

Comments
 (0)