Skip to content

Commit f9b864f

Browse files
committed
SASL auth support in postgres
1 parent 8fc5ba2 commit f9b864f

File tree

3 files changed

+335
-184
lines changed

3 files changed

+335
-184
lines changed

postgres-protocol/src/message/frontend.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ pub fn sasl_initial_response(mechanism: &str, data: &[u8], buf: &mut Vec<u8>) ->
274274
buf.push(b'p');
275275
write_body(buf, |buf| {
276276
try!(buf.write_cstr(mechanism));
277+
let len = try!(i32::from_usize(data.len()));
278+
try!(buf.write_i32::<BigEndian>(len));
277279
buf.extend_from_slice(data);
278280
Ok(())
279281
})

0 commit comments

Comments
 (0)