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

Update Truncate doc with compress behaviour #1217

Merged
merged 3 commits into from
Feb 10, 2021
Merged

Conversation

chantra
Copy link
Contributor

@chantra chantra commented Feb 8, 2021

This is a documentation update to highlight the behaviour of Truncate, which will reset dns.Compress to false when the message fits in the requested size without truncation, and make it the caller responsibility to set it back to true if they wish to compress, regardless of fitting, uncompressed, in the requested message size in the first place or not.
Fixes #1216

This is a documentation update to highlight the behaviour of Truncate, which will reset dns.Compress to false when the message fits in the requested size without truncation, and make it the caller responsibility to set it back to true if they wish to compress, regardless of fitting, uncompressed, in the requested message size in the first place or not.
Fixes miekg#1216
@chantra chantra requested review from miekg and tmthrgd as code owners February 8, 2021 18:29
Copy link
Collaborator

@tmthrgd tmthrgd left a comment

Choose a reason for hiding this comment

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

Minor nits, otherwise seems fine.

msg_truncate.go Outdated Show resolved Hide resolved
msg_truncate.go Outdated Show resolved Hide resolved
msg_truncate.go Outdated Show resolved Hide resolved
msg_truncate.go Outdated Show resolved Hide resolved
* d/Note that/
* s/reset/set/
* s/caller/caller's/
* removed backticks
Copy link
Collaborator

@tmthrgd tmthrgd left a comment

Choose a reason for hiding this comment

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

One very minor nit, then LGTM.

msg_truncate.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@tmthrgd tmthrgd left a comment

Choose a reason for hiding this comment

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

Thanks for your patience. LGTM.

@miekg miekg merged commit ee8fef6 into miekg:master Feb 10, 2021
aanm pushed a commit to cilium/dns that referenced this pull request Jul 29, 2022
* Update Truncate doc with compress behaviour

This is a documentation update to highlight the behaviour of Truncate, which will reset dns.Compress to false when the message fits in the requested size without truncation, and make it the caller responsibility to set it back to true if they wish to compress, regardless of fitting, uncompressed, in the requested message size in the first place or not.
Fixes miekg#1216

* address comments

* d/Note that/
* s/reset/set/
* s/caller/caller's/
* removed backticks

* regardless of size
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.

CompressAndTruncate
3 participants