pires / go-proxyproto

A Go library implementation of the PROXY protocol, versions 1 and 2.
Apache License 2.0
478 stars 107 forks source link

Reset read deadline after parsing header #76

Closed pires closed 3 years ago

pires commented 3 years ago

Can you, please, help review @unmarshal, as it is related to your PR #74?

Fixes #75

coveralls commented 3 years ago

Coverage Status

Coverage increased (+1.2%) to 95.543% when pulling 880d57822ef3aefe1e98ffc9ca49d77a37ded13b on bugfix/reset_conn_read_deadline_after_successful_header into a55009f57753eb1843d4e29b4ba1bd2fb777ddfe on main.

vansante commented 3 years ago

From my somewhat limited testing it still breaks off the connection with version github.com/pires/go-proxyproto@v0.6.1-0.20210713120647-bab7dd263f97 in my go.mod although I cannot quite explain why :man_shrugging: .

pires commented 3 years ago

Well, I think the testcase I implemented proves that the code in master fails and later passes with this PR so I'm out of ideas on what the issue may be for you.

unmarshal commented 3 years ago

I will be back in town next week. I will take a look first thing.

Thanks

On Thu, Jul 15, 2021 at 04:53 Pires @.***> wrote:

Well, I think the testcase I implemented prove that the code in master fails and passes with this PR so I'm out of ideas on what the issue may be for you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pires/go-proxyproto/pull/76#issuecomment-880597094, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAD5RCGK3NCGXUPDN6L2NDTX24ZLANCNFSM5AI6Q4LA .

-- Sent from Gmail Mobile

pires commented 3 years ago

@unmarshal any chance you'll be able to take a look into this soon?

@antoniomika thanks for the comment. I need to take an hour to think this through and your feedback is definitely appreciated.

unmarshal commented 3 years ago

@antoniomika's change looks correct to me.

pires commented 3 years ago

@unmarshal are you sure? Please, read this https://github.com/pires/go-proxyproto/pull/76/files#r694345619

pires commented 3 years ago

Thank you all very much for reporting the issue, the discussion on how to address and the code. I'm happy to have you all around 🙇🏻

pires commented 3 years ago

The fix was released as https://github.com/pires/go-proxyproto/releases/tag/v0.6.1