diff --git a/tests/asyncunit.nim b/tests/asyncunit.nim index 79d1a97..4947881 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 9abb434..b6f3539 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 4fe5a18..5fbeda7 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 596afb5..68f3222 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 74e17c5..4443c04 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 dba53af..dcdf22a 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 71db1a1..e03e1ef 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 b69c410..dbdb5f4 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 373990f..7e70265 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 d172614..ae6d720 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 399a977..75634f7 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 479674e..fe41a49 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 be838ed..3010190 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 7f9fe5f..ee4f606 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 827d2da..ea2fb32 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 a25b9ff..f0fd92d 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 faf654e..82f416f 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 865c9d4..c33ad10 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 2410445..c57bf18 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))