diff --git a/tests/asyncunit.nim b/tests/asyncunit.nim index 79d1a977..49478813 100644 --- a/tests/asyncunit.nim +++ b/tests/asyncunit.nim @@ -1,3 +1,12 @@ +## nim-ws +## Copyright (c) 2021 Status Research & Development GmbH +## Licensed under either of +## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +## * MIT license ([LICENSE-MIT](LICENSE-MIT)) +## at your option. +## This file may not be copied, modified, or distributed except according to +## those terms. + import unittest2 export unittest2 except suite, test diff --git a/tests/extensions/testextflow.nim b/tests/extensions/testextflow.nim index 9abb434c..b6f35397 100644 --- a/tests/extensions/testextflow.nim +++ b/tests/extensions/testextflow.nim @@ -1,3 +1,12 @@ +## nim-ws +## Copyright (c) 2021 Status Research & Development GmbH +## Licensed under either of +## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +## * MIT license ([LICENSE-MIT](LICENSE-MIT)) +## at your option. +## This file may not be copied, modified, or distributed except according to +## those terms. + import std/strutils import pkg/[chronos, stew/byteutils] diff --git a/tests/extensions/testexts.nim b/tests/extensions/testexts.nim index 4fe5a182..5fbeda7d 100644 --- a/tests/extensions/testexts.nim +++ b/tests/extensions/testexts.nim @@ -12,7 +12,7 @@ import ../asyncunit import ./base64ext, ./hexext import ../../ws/ws, ../helpers -suite "UTF-8 validator in action": +suite "multiple extensions flow": var server: HttpServer let address = initTAddress("127.0.0.1:8888") let hexFactory = hexFactory() diff --git a/tests/helpers.nim b/tests/helpers.nim index 596afb55..68f32228 100644 --- a/tests/helpers.nim +++ b/tests/helpers.nim @@ -1,3 +1,12 @@ +## nim-ws +## Copyright (c) 2021 Status Research & Development GmbH +## Licensed under either of +## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +## * MIT license ([LICENSE-MIT](LICENSE-MIT)) +## at your option. +## This file may not be copied, modified, or distributed except according to +## those terms. + {.push raises: [Defect].} import std/[strutils, random] diff --git a/tests/keys.nim b/tests/keys.nim index 74e17c5e..4443c046 100644 --- a/tests/keys.nim +++ b/tests/keys.nim @@ -1,3 +1,12 @@ +## nim-ws +## Copyright (c) 2021 Status Research & Development GmbH +## Licensed under either of +## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +## * MIT license ([LICENSE-MIT](LICENSE-MIT)) +## at your option. +## This file may not be copied, modified, or distributed except according to +## those terms. + const SecureKey* = """ -----BEGIN PRIVATE KEY----- diff --git a/tests/testcommon.nim b/tests/testcommon.nim index dba53afd..dcdf22a4 100644 --- a/tests/testcommon.nim +++ b/tests/testcommon.nim @@ -1,3 +1,12 @@ +## nim-ws +## Copyright (c) 2021 Status Research & Development GmbH +## Licensed under either of +## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +## * MIT license ([LICENSE-MIT](LICENSE-MIT)) +## at your option. +## This file may not be copied, modified, or distributed except according to +## those terms. + {. warning[UnusedImport]:off .} import ./testframes diff --git a/tests/testframes.nim b/tests/testframes.nim index 71db1a19..e03e1ef4 100644 --- a/tests/testframes.nim +++ b/tests/testframes.nim @@ -1,3 +1,12 @@ +## nim-ws +## Copyright (c) 2021 Status Research & Development GmbH +## Licensed under either of +## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +## * MIT license ([LICENSE-MIT](LICENSE-MIT)) +## at your option. +## This file may not be copied, modified, or distributed except according to +## those terms. + import pkg/[asynctest, stew/byteutils] include ../ws/frame diff --git a/tests/testwebsockets.nim b/tests/testwebsockets.nim index b69c4105..dbdb5f49 100644 --- a/tests/testwebsockets.nim +++ b/tests/testwebsockets.nim @@ -1,3 +1,12 @@ +## nim-ws +## Copyright (c) 2021 Status Research & Development GmbH +## Licensed under either of +## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +## * MIT license ([LICENSE-MIT](LICENSE-MIT)) +## at your option. +## This file may not be copied, modified, or distributed except according to +## those terms. + import std/[strutils, random] import pkg/[ httputils, diff --git a/ws.nimble b/ws.nimble index 373990f7..7e70265b 100644 --- a/ws.nimble +++ b/ws.nimble @@ -1,3 +1,12 @@ +## nim-ws +## Copyright (c) 2021 Status Research & Development GmbH +## Licensed under either of +## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +## * MIT license ([LICENSE-MIT](LICENSE-MIT)) +## at your option. +## This file may not be copied, modified, or distributed except according to +## those terms. + packageName = "ws" version = "0.1.0" author = "Status Research & Development GmbH" diff --git a/ws/extensions.nim b/ws/extensions.nim index d1726148..ae6d7209 100644 --- a/ws/extensions.nim +++ b/ws/extensions.nim @@ -1,3 +1,11 @@ +## nim-ws +## Copyright (c) 2021 Status Research & Development GmbH +## Licensed under either of +## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +## * MIT license ([LICENSE-MIT](LICENSE-MIT)) +## at your option. +## This file may not be copied, modified, or distributed except according to +## those terms. import std/tables import ./extensions/extutils diff --git a/ws/frame.nim b/ws/frame.nim index 399a977c..75634f7c 100644 --- a/ws/frame.nim +++ b/ws/frame.nim @@ -1,4 +1,4 @@ -## Nim-Libp2p +## nim-ws ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/ws/http.nim b/ws/http.nim index 479674e4..fe41a498 100644 --- a/ws/http.nim +++ b/ws/http.nim @@ -1,3 +1,12 @@ +## nim-ws +## Copyright (c) 2021 Status Research & Development GmbH +## Licensed under either of +## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +## * MIT license ([LICENSE-MIT](LICENSE-MIT)) +## at your option. +## This file may not be copied, modified, or distributed except according to +## those terms. + import std/uri import pkg/[ chronos, diff --git a/ws/http/client.nim b/ws/http/client.nim index be838ed0..3010190e 100644 --- a/ws/http/client.nim +++ b/ws/http/client.nim @@ -1,3 +1,12 @@ +## nim-ws +## Copyright (c) 2021 Status Research & Development GmbH +## Licensed under either of +## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +## * MIT license ([LICENSE-MIT](LICENSE-MIT)) +## at your option. +## This file may not be copied, modified, or distributed except according to +## those terms. + {.push raises: [Defect].} import std/[uri, strutils] @@ -59,11 +68,11 @@ proc generateHeaders( var headersData = toUpperAscii($httpMethod) headersData.add " " - if not requestUrl.path.startsWith("/"): headersData.add "/" - headersData.add(requestUrl.path) + if not requestUrl.path.startsWith("/"): headersData.add "/" + headersData.add(requestUrl.path) if requestUrl.query.len > 0: - headersData.add("?" & requestUrl.query) - headersData.add(" ") + headersData.add("?" & requestUrl.query) + headersData.add(" ") headersData.add($version & CRLF) for (key, val) in headers.stringItems(true): diff --git a/ws/http/common.nim b/ws/http/common.nim index 7f9fe5f5..ee4f606e 100644 --- a/ws/http/common.nim +++ b/ws/http/common.nim @@ -1,3 +1,12 @@ +## nim-ws +## Copyright (c) 2021 Status Research & Development GmbH +## Licensed under either of +## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +## * MIT license ([LICENSE-MIT](LICENSE-MIT)) +## at your option. +## This file may not be copied, modified, or distributed except according to +## those terms. + {.push raises: [Defect].} import std/[uri] diff --git a/ws/http/server.nim b/ws/http/server.nim index 827d2da9..ea2fb324 100644 --- a/ws/http/server.nim +++ b/ws/http/server.nim @@ -1,3 +1,11 @@ +## nim-ws +## Copyright (c) 2021 Status Research & Development GmbH +## Licensed under either of +## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +## * MIT license ([LICENSE-MIT](LICENSE-MIT)) +## at your option. +## This file may not be copied, modified, or distributed except according to +## those terms. {.push raises: [Defect].} diff --git a/ws/session.nim b/ws/session.nim index a25b9ffc..f0fd92d4 100644 --- a/ws/session.nim +++ b/ws/session.nim @@ -1,4 +1,4 @@ -## Nim-Libp2p +## nim-ws ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/ws/types.nim b/ws/types.nim index faf654e1..82f416f4 100644 --- a/ws/types.nim +++ b/ws/types.nim @@ -1,4 +1,4 @@ -## Nim-Libp2p +## nim-ws ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) diff --git a/ws/utils.nim b/ws/utils.nim index 865c9d46..c33ad103 100644 --- a/ws/utils.nim +++ b/ws/utils.nim @@ -1,3 +1,12 @@ +## nim-ws +## Copyright (c) 2021 Status Research & Development GmbH +## Licensed under either of +## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) +## * MIT license ([LICENSE-MIT](LICENSE-MIT)) +## at your option. +## This file may not be copied, modified, or distributed except according to +## those terms. + import bearssl export bearssl diff --git a/ws/ws.nim b/ws/ws.nim index 2410445f..c57bf186 100644 --- a/ws/ws.nim +++ b/ws/ws.nim @@ -1,4 +1,4 @@ -## Nim-Libp2p +## nim-ws ## Copyright (c) 2021 Status Research & Development GmbH ## Licensed under either of ## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))