Skip to content

Fix typos #749

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion examples/src/aleph/examples/http.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
2 changes: 1 addition & 1 deletion examples/src/aleph/examples/tcp.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions src/aleph/http.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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`.
Expand All @@ -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']
Expand Down
4 changes: 2 additions & 2 deletions src/aleph/http/client.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion src/aleph/http/websocket/client.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/aleph/http/websocket/server.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/aleph/netty.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/aleph/http_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down