diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8a9446b3..edf97c49 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -101,7 +101,7 @@ While it's tempting to reformat things left and right, this has the downside of ## Updating dependencies -There’s some extra steps to test when updating dependencies: +There are some extra steps to test when updating dependencies: 1. After you've made your changes to `project.clj`, be sure to rerun the tests with `lein test`. diff --git a/README.md b/README.md index efeace3a..00d5ef21 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ For HTTP client requests, Aleph models itself after [clj-http](https://github.co Aleph attempts to mimic the clj-http API and capabilities fully. It supports multipart/form-data requests, cookie stores, proxy servers and requests inspection with a few notable differences: -* proxy configuration should be set for the connection when seting up a connection pool, per-request proxy setups are not allowed +* proxy configuration should be set for the connection when setting up a connection pool, per-request proxy setups are not allowed * HTTP proxy functionality is extended with tunneling settings, optional HTTP headers and connection timeout control, see [all configuration keys](https://github.com/clj-commons/aleph/blob/d33c76d6c7d1bf9788369fe6fd9d0e56434c8244/src/aleph/http.clj#L122-L132) diff --git a/examples/src/aleph/examples/http.clj b/examples/src/aleph/examples/http.clj index e267c8d2..d486f4b5 100644 --- a/examples/src/aleph/examples/http.clj +++ b/examples/src/aleph/examples/http.clj @@ -46,7 +46,7 @@ (hello-world-handler req))) (defn delayed-hello-world-handler - "Alternately, we can use a [core.async](https://github.com/clojure/core.async) goroutine to + "Alternatively, we can use a [core.async](https://github.com/clojure/core.async) goroutine to create our response, and convert the channel it returns using `manifold.deferred/->source`, and then take the first message from it. This is entirely equivalent to the previous implementation." diff --git a/examples/src/aleph/examples/tcp.clj b/examples/src/aleph/examples/tcp.clj index 5bee2b06..250fefe2 100644 --- a/examples/src/aleph/examples/tcp.clj +++ b/examples/src/aleph/examples/tcp.clj @@ -149,7 +149,7 @@ (s/put! s (str "ERROR: " ex)) (s/close! s))))))) -;; Alternately, we use `manifold.deferred/let-flow` to implement the composition of these +;; Alternatively, we use `manifold.deferred/let-flow` to implement the composition of these ;; asynchronous values. It is certainly more concise, but at the cost of being less explicit. (defn slow-echo-handler [f] diff --git a/src/aleph/http.clj b/src/aleph/http.clj index 08efc6a4..a27b9037 100644 --- a/src/aleph/http.clj +++ b/src/aleph/http.clj @@ -286,7 +286,7 @@ | `ssl-context` | an `io.netty.handler.ssl.SslContext` object, only required if a custom context is required | `ssl-endpoint-id-alg` | the name of the algorithm to use for SSL endpoint identification (see https://docs.oracle.com/en/java/javase/17/docs/specs/security/standard-names.html#endpoint-identification-algorithms), defaults to \"HTTPS\". Only used for WSS connections. Pass `nil` to disable endpoint identification. | `extensions?` | if `true`, the websocket extensions will be supported. - | `sub-protocols` | a string with a comma seperated list of supported sub-protocols. + | `sub-protocols` | a string with a comma separated list of supported sub-protocols. | `headers` | the headers that should be included in the handshake | `compression?` | when set to `true`, enables client to use permessage-deflate compression extension, defaults to `false`. | `pipeline-transform` | an optional function that takes an `io.netty.channel.ChannelPipeline` object, which represents a connection, and modifies it. @@ -310,7 +310,7 @@ | --- | --- | `raw-stream?` | if `true`, the connection will emit raw `io.netty.buffer.ByteBuf` objects rather than strings or byte-arrays. This will minimize copying, but means that care must be taken with Netty's buffer reference counting. Only recommended for advanced users. | `headers` | the headers that should be included in the handshake - | `compression?` | when set to `true`, enables permessage-deflate compression extention support for the connection, defaults to `false`. + | `compression?` | when set to `true`, enables permessage-deflate compression extension support for the connection, defaults to `false`. | `pipeline-transform` | an optional function that takes an `io.netty.channel.ChannelPipeline` object, which represents a connection, and modifies it. | `max-frame-payload` | maximum allowable frame payload length, in bytes, defaults to `65536`. | `max-frame-size` | maximum aggregate message size, in bytes, defaults to `1048576`. @@ -324,7 +324,7 @@ (defn websocket-ping "Takes a websocket endpoint (either client or server) and returns a deferred that will yield true whenever the PONG comes back, or false if the connection is closed. Subsequent - PINGs are supressed to avoid ambiguity in a way that the next PONG trigger all pending PINGs." + PINGs are suppressed to avoid ambiguity in a way that the next PONG trigger all pending PINGs." ([conn] (ws.common/websocket-ping conn (d/deferred) nil)) ([conn d'] diff --git a/src/aleph/http/client.clj b/src/aleph/http/client.clj index 019b0dec..67f2bebf 100644 --- a/src/aleph/http/client.clj +++ b/src/aleph/http/client.clj @@ -97,7 +97,7 @@ (defn exception-handler [ctx ex response-stream] (log/warn "exception-handler" ex) (cond - ;; could happens when io.netty.handler.codec.http.HttpObjectAggregator + ;; could happen when io.netty.handler.codec.http.HttpObjectAggregator ;; is part of the pipeline (instance? TooLongFrameException ex) (s/put! response-stream ex) @@ -336,7 +336,7 @@ (true? ssl?))) (throw (IllegalArgumentException. (str "Proxy options given require sending CONNECT request, " - "but `tunnel?' option is set to 'false' explicitely. " + "but `tunnel?' option is set to 'false' explicitly. " "Consider setting 'tunnel?' to 'true' or omit it at all")))) (if (non-tunnel-proxy? options') diff --git a/src/aleph/http/websocket/client.clj b/src/aleph/http/websocket/client.clj index e1805c9b..f3c59cd9 100644 --- a/src/aleph/http/websocket/client.clj +++ b/src/aleph/http/websocket/client.clj @@ -190,7 +190,7 @@ (if raw-stream? (let [body (.content ^TextWebSocketFrame msg)] ;; pass ByteBuf body directly to lower next - ;; level. it's their reponsibility to release + ;; level. it's their responsibility to release (netty/put! ch @in body)) (let [text (.text ^TextWebSocketFrame msg)] (netty/release msg) diff --git a/src/aleph/http/websocket/server.clj b/src/aleph/http/websocket/server.clj index c3e9f194..9300b509 100644 --- a/src/aleph/http/websocket/server.clj +++ b/src/aleph/http/websocket/server.clj @@ -112,7 +112,7 @@ (if raw-stream? (let [body (.content ^TextWebSocketFrame msg)] ;; pass ByteBuf body directly to next level (it's - ;; their reponsibility to release) + ;; their responsibility to release) (netty/put! ch in body)) (let [text (.text ^TextWebSocketFrame msg)] ;; working with text now, so we do not need diff --git a/src/aleph/netty.clj b/src/aleph/netty.clj index 49336df4..0f7a2dc3 100644 --- a/src/aleph/netty.clj +++ b/src/aleph/netty.clj @@ -1193,7 +1193,7 @@ (instance? SslContext ssl-context) ssl-context - ;; in future this option might be interesing + ;; in future this option might be interesting ;; for turning application config (e.g. ALPN) ;; depending on the server's capabilities (instance? SslContextBuilder ssl-context) diff --git a/test/aleph/http_test.clj b/test/aleph/http_test.clj index f04b6d2a..60ff10a3 100644 --- a/test/aleph/http_test.clj +++ b/test/aleph/http_test.clj @@ -1274,7 +1274,7 @@ (is (= "Internal Server Error" (bs/to-string (:body resp))))))) (testing "reading invalid request message: bad request" - ;; this request should fail with `IllegalArgumentException` "multiple Content-Lenght headers" + ;; this request should fail with `IllegalArgumentException` "multiple Content-Length headers" (with-tcp-request {} ["GET / HTTP/1.1" "content-length: 0" "content-length: 1"]