mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
fix(rds): buffer PostgreSQL login responses for PgBouncer (#6005)
This commit is contained in:
1 parent
2b45288e13
commit
83147f204e
5 files changed
+285
-1
No files matched your search
+3
-1
@@ -149,7 +149,9 @@ public class PostgresProtocolHandler {
|
||||
client = startup.socket();
|
||||
String clientUsername = startup.username();
|
||||
InputStream clientIn = client.getInputStream();
|
||||
OutputStream clientOut = client.getOutputStream();
|
||||
// PgBouncer rejects partial login packets; keep the challenge together until flush().
|
||||
// https://github.com/pgbouncer/pgbouncer/blob/pgbouncer_1_24_0/src/server.c#L116-L119
|
||||
OutputStream clientOut = new BufferedOutputStream(client.getOutputStream());
|
||||
|
||||
// Phase 2: Challenge client with cleartext password request
|
||||
sendMessage(clientOut, 'R', intBytes(3)); // AuthenticationCleartextPassword
|
||||
|
||||
Reference in new issue
Block a user