You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--- FAIL: TestMsgCompressionEscapingCompressionMap (0.00s)
length_test.go:398: predicted compressed length is wrong: predicted 61, actual 50
The problem is that \\097 is a perfectly valid escaping of a, PackDomainName handles this by putting the unescaped name (only the first label is unescaped) into the compression map, while the Len code puts the escaped name in the compression map. (This isn't effected by #833).
I'm not sure what the best way to fix this is, fixing this in Len would (I think) require extra allocations, and fixing this in PackDomainName is trickier than it might seem.
This is one of the corner cases I mentioned in #652 (comment).
The text was updated successfully, but these errors were encountered:
[ Quoting <notifications@github.com> in "[miekg/dns] Escaped names compressi..." ]
This is one of the corner cases I mentioned in #652 (comment).
Ack.
I'm all for normalizing this and not making this horrible (internal type
that we convert from and to?). It's clear that the current impl. is not the best
one and we can keep on finding non-working corner cases.
Which may be harder than it sounds...
The following test case fails due to differences in escaping between
PackDomainName
andLen
:with:
The problem is that
\\097
is a perfectly valid escaping ofa
,PackDomainName
handles this by putting the unescaped name (only the first label is unescaped) into the compression map, while theLen
code puts the escaped name in the compression map. (This isn't effected by #833).I'm not sure what the best way to fix this is, fixing this in
Len
would (I think) require extra allocations, and fixing this inPackDomainName
is trickier than it might seem.This is one of the corner cases I mentioned in #652 (comment).
The text was updated successfully, but these errors were encountered: