Skip to content

Correct the max hostname length constant.#1012

Merged
iphydf merged 1 commit into
TokTok:masterfrom
iphydf:255-bytes
Jul 18, 2018
Merged

Correct the max hostname length constant.#1012
iphydf merged 1 commit into
TokTok:masterfrom
iphydf:255-bytes

Conversation

@iphydf
Copy link
Copy Markdown
Member

@iphydf iphydf commented Jul 18, 2018

256 bytes including NUL byte is confusing and makes for really annoying
bindings to other languages that don't account for NUL bytes in their
string length. We pass C strings, not byte arrays, for hostnames, so 255
makes more sense here.


This change is Reviewable

@iphydf iphydf added this to the v0.2.4 milestone Jul 18, 2018
256 bytes including NUL byte is confusing and makes for really annoying
bindings to other languages that don't account for NUL bytes in their
string length. We pass C strings, not byte arrays, for hostnames, so 255
makes more sense here.
Copy link
Copy Markdown

@robinlinden robinlinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm_strong:

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! 1 of 1 LGTMs obtained

@iphydf iphydf merged commit 392eef7 into TokTok:master Jul 18, 2018
@iphydf iphydf deleted the 255-bytes branch July 18, 2018 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants