Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify get #99

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Simplify get #99

wants to merge 2 commits into from

Conversation

dswarbrick
Copy link
Contributor

@dswarbrick dswarbrick commented Sep 16, 2024

Refactor and simplify the get() function, using some built-in types like http.Header to make the code clearer. Also check for errors when writing to net.Conn.

Change Headers string slice in struct members to a ProxyHeader string. This is only ever used for an optional PROXY protocol header, and was easy to confuse with HTTP headers.

Refactor and simplify the get() function, using some built-in types like
http.Header to make the code clearer. Also check for errors when writing
to net.Conn.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
The Headers slice is only ever used for an optional PROXY protocol
header, and was easy to confuse with HTTP headers.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant