Skip to content

Commit e64c2c5

Browse files
committed
Release 0.7.0-alpha2
1 parent dfc2cad commit e64c2c5

File tree

6 files changed

+24
-7
lines changed

6 files changed

+24
-7
lines changed

CHANGES.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
### 0.7.0-alpha2
2+
3+
* Enable SSL/TLS certificate hostname verification by default in the client. (Warning: This is a BREAKING change for those with misconfigured server certificates.)
4+
5+
Contribution by Moritz Heidkamp.
6+
17
### 0.7.0-alpha1
28

39
* Add support for HTTP/2 in the client.

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ Aleph exposes data from the network as a [Manifold](https://github.com/clj-commo
88

99
Leiningen:
1010
```clojure
11-
[aleph "0.7.0-alpha1"]
11+
[aleph "0.7.0-alpha2"]
1212
```
1313
deps.edn:
1414
```clojure
15-
aleph/aleph {:mvn/version "0.7.0-alpha1"}
15+
aleph/aleph {:mvn/version "0.7.0-alpha2"}
1616
;; alternatively
1717
io.github.clj-commons/aleph {:git/sha "..."}
1818
```
1919

2020
### HTTP
2121

22+
#### Server
2223
Aleph follows the [Ring](https://github.com/ring-clojure) spec fully, and can be a drop-in replacement for any existing Ring-compliant server. However, it also allows for the handler function to return a [Manifold deferred](https://github.com/clj-commons/manifold) to represent an eventual response. This feature may not play nicely with synchronous Ring middleware which modifies the response, but this can be easily fixed by reimplementing the middleware using Manifold's [let-flow](https://github.com/clj-commons/manifold/blob/master/doc/deferred.md#let-flow) operator. The `aleph.http/wrap-ring-async-handler` helper can be used to convert async 3-arity Ring handler to Aleph-compliant one.
2324

2425
```clojure
@@ -34,6 +35,8 @@ Aleph follows the [Ring](https://github.com/ring-clojure) spec fully, and can be
3435

3536
The body of the response may also be a Manifold stream, where each message from the stream is sent as a chunk, allowing for precise control over streamed responses for [server-sent events](http://en.wikipedia.org/wiki/Server-sent_events) and other purposes.
3637

38+
#### Client
39+
3740
For HTTP client requests, Aleph models itself after [clj-http](https://github.com/dakrone/clj-http), except that every request immediately returns a Manifold deferred representing the response.
3841

3942
```clojure

docs/http.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# HTTP
22

3-
Aleph follows the [Ring](https://github.com/ring-clojure) spec fully, and can be a drop-in replacement for any existing Ring-compliant server. However, it also allows for the handler function to return a [Manifold deferred](https://github.com/clj-commons/manifold) to represent an eventual response. This feature may not play nicely with Ring middleware which modifies the response, but this can be easily fixed by reimplementing the middleware using Manifold's [let-flow](https://cljdoc.org/d/manifold/manifold/CURRENT/api/manifold.deferred#let-flow) operator.
3+
Aleph follows the [Ring](https://github.com/ring-clojure) spec fully, and can
4+
be a drop-in replacement for any existing Ring-compliant server. However, it
5+
also allows for the handler function to return a
6+
[Manifold deferred](https://github.com/clj-commons/manifold) to represent an
7+
eventual response. This feature may not play nicely with Ring middleware which
8+
modifies the response, but this can be easily fixed by reimplementing the
9+
middleware using Manifold's
10+
[let-flow](https://cljdoc.org/d/manifold/manifold/CURRENT/api/manifold.deferred#let-flow)
11+
operator.
412

513
```clj
614
(require '[aleph.http :as http])

examples/project.clj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
(defproject aleph.examples "0.7.0-alpha1"
2-
:dependencies [[aleph "0.7.0-alpha1"]
1+
(defproject aleph.examples "0.7.0-alpha2"
2+
:dependencies [[aleph "0.7.0-alpha2"]
33
[gloss "0.2.6"]
44
[metosin/reitit "0.5.18"]
55
[org.clojure/clojure "1.11.1"]

project.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
;; you'll need to run the script at `deps/lein-to-deps` after changing any dependencies
22
(def netty-version "4.1.94.Final")
33

4-
(defproject aleph (or (System/getenv "PROJECT_VERSION") "0.7.0-alpha1")
4+
(defproject aleph (or (System/getenv "PROJECT_VERSION") "0.7.0-alpha2")
55
:description "A framework for asynchronous communication"
66
:url "https://github.com/clj-commons/aleph"
77
:license {:name "MIT License"}

src/aleph/http/server.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
(map #(HttpHeaders/newEntity %) ["Server" "Connection" "Date" "Content-Type"])
100100

101101
[server-value keep-alive-value close-value]
102-
(map #(HttpHeaders/newEntity %) ["Aleph/0.7.0-alpha1" "Keep-Alive" "Close"])]
102+
(map #(HttpHeaders/newEntity %) ["Aleph/0.7.0-alpha2" "Keep-Alive" "Close"])]
103103
(defn send-response
104104
[^ChannelHandlerContext ctx keep-alive? ssl? error-handler rsp]
105105
(let [[^HttpResponse rsp body]

0 commit comments

Comments
 (0)