playframework / play1

Play framework
https://www.playframework.com/documentation/1.4.x/home
Other
1.58k stars 683 forks source link

Upgrade com.ning:async-http-client to org.asynchttpclient:async-http-client #1426

Open sp00m opened 2 years ago

sp00m commented 2 years ago

Play v1.7.1 still relies on an old version of AsyncHttpClient: https://github.com/playframework/play1/blob/1.7.1/framework/dependencies.yml#L21.

This library has moved from https://github.com/ning/async-http-client (last commit in 2016) to https://github.com/AsyncHttpClient/async-http-client.

Should we upgrade Play accordingly?

asolntsev commented 2 years ago

@sp00m Yes, sure, it would be great to upgrade Play accordingly. Can you prepare a pull request?

asolntsev commented 2 years ago

@sp00m Wait, no, we cannot upgrade. This library requires Netty 4.1.60.Final, but Play1 still uses Netty 3.x

sp00m commented 2 years ago

Ouch, good catch! Looks like migrating to Netty 4 is WIP: https://github.com/playframework/play1/issues/1284. That doesn't seem easy though, according to the discussions on that issue :/

cies commented 2 years ago

An attempt was also made to upgrade this on RePlay (a Play1 fork): https://github.com/codeborne/replay/pull/25

It's quite close, but serving static assets is still a pain point iirc.

Alexandermjos commented 2 years ago

Would it be an alternative to use Java's "new" built in HttpClient? Support both send() and sendAsync().