cactoos-http icon indicating copy to clipboard operation
cactoos-http copied to clipboard

HTTP/2 support

Open g4s8 opened this issue 6 years ago • 25 comments

Does cactoos-http designed to support HTTP/2 protocol? If yes how does it share sockets (or clients) across requests?

g4s8 avatar Apr 02 '18 13:04 g4s8

@g4s8 that's a good question. Yes, we should support HTTP/2. Let's think how to do that right.

yegor256 avatar Apr 03 '18 10:04 yegor256

@yegor256 looks like it can be HtWire implementation, e.g.:

try (final HtWire http2 = new Http2Wire("example.com")) {
  new HtResponse(
      http2,
      new JoinedText(
        "\n\r"
        "GET / HTTP/2",
        "Host: www.example.com"
      )
    );
}

also it can be helpful to see how it's implemented in other clients: https://github.com/square/okhttp/blob/master/okhttp/src/main/java/okhttp3/internal/http2/Http2Connection.java

g4s8 avatar Apr 03 '18 13:04 g4s8

@g4s8 @yegor256 I have no idea how HTTP/2 works

@g4s8 can you implement a small, initial step in the right direction?

llorllale avatar May 15 '18 13:05 llorllale

@llorllale sure I'll have a look later

g4s8 avatar May 15 '18 13:05 g4s8

@g4s8 you want this task?

llorllale avatar May 15 '18 15:05 llorllale

@llorllale yes, please assign me

g4s8 avatar May 15 '18 18:05 g4s8

@0crat assign @g4s8

llorllale avatar May 15 '18 18:05 llorllale

@0crat assign @g4s8 (here)

@llorllale The job #2 assigned to @g4s8/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this @g4s8/z is not a member of this project yet, but they can request to join, as §1 explains

0crat avatar May 15 '18 18:05 0crat

Bug was reported, see §29: +15 point(s) just awarded to @g4s8/z

0crat avatar May 15 '18 18:05 0crat

Manual assignment of issues is discouraged, see §19: -5 point(s) just awarded to @llorllale/z

0crat avatar May 15 '18 18:05 0crat

It is strongly discouraged to assign jobs to their creators, see §19: -15 point(s) just awarded to @llorllale/z

0crat avatar May 15 '18 18:05 0crat

@0crat refuse

llorllale avatar Jan 03 '19 21:01 llorllale

@0crat refuse (here)

@llorllale The user @g4s8/z resigned from #2, please stop working. Reason for job resignation: Order was cancelled

0crat avatar Jan 03 '19 21:01 0crat

The job #2 assigned to @ilyakharlamov/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

0crat avatar Jan 13 '19 18:01 0crat

@0crat refuse ALPN is required for HTTP/2, but it isn’t available in Java until JDK 9. OkHttp and other clients also require either Java 9 or hacked boot classes from Java 9. Since this project is Java 8 (see pom.xml), sane implementation is not possible without JDK switching.

ilyakharlamov avatar Jan 15 '19 16:01 ilyakharlamov

Are you speaking to me or about me here; you must always start your message with my name if you want to address it to me, see §1

0crat avatar Jan 15 '19 16:01 0crat

@0crat refuse

ilyakharlamov avatar Jan 15 '19 17:01 ilyakharlamov

@0crat refuse (here)

@ilyakharlamov The user @ilyakharlamov/z resigned from #2, please stop working. Reason for job resignation: Order was cancelled

0crat avatar Jan 15 '19 17:01 0crat

Tasks refusal is discouraged, see §6: -15 point(s) just awarded to @ilyakharlamov/z

0crat avatar Jan 15 '19 17:01 0crat

The job #2 assigned to @borysfan/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

0crat avatar Jan 19 '19 15:01 0crat

@0crat refuse

llorllale avatar Mar 18 '19 23:03 llorllale

@0crat refuse (here)

@llorllale The user @borysfan/z resigned from #2, please stop working. Reason for job resignation: Order was cancelled

0crat avatar Mar 18 '19 23:03 0crat

The job #2 assigned to @mazdack/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

0crat avatar Mar 18 '19 23:03 0crat

The architect of the project has changed; @llorllale/z is not at this role anymore; @paulodamaso/z is the architect now

0crat avatar Sep 11 '19 13:09 0crat

The architect of the project has changed; @paulodamaso/z is not at this role anymore; @victornoel/z is the architect now

0crat avatar Jul 05 '20 14:07 0crat