Changeset 725 in code for trunk/upstream.go
- Timestamp:
- Nov 21, 2021, 3:28:38 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/upstream.go
r724 r725 1732 1732 } 1733 1733 1734 func (uc *upstreamConn) supportsSASL(mech string) bool { 1735 v, ok := uc.supportedCaps["sasl"] 1736 if !ok { 1737 return false 1738 } 1739 1740 if v == "" { 1741 return true 1742 } 1743 1744 mechanisms := strings.Split(v, ",") 1745 for _, mech := range mechanisms { 1746 if strings.EqualFold(mech, mech) { 1747 return true 1748 } 1749 } 1750 return false 1751 } 1752 1734 1753 func (uc *upstreamConn) requestSASL() bool { 1735 1754 if uc.network.SASL.Mechanism == "" { 1736 1755 return false 1737 1756 } 1738 1739 v, ok := uc.supportedCaps["sasl"] 1740 if !ok { 1741 return false 1742 } 1743 if v != "" { 1744 mechanisms := strings.Split(v, ",") 1745 found := false 1746 for _, mech := range mechanisms { 1747 if strings.EqualFold(mech, uc.network.SASL.Mechanism) { 1748 found = true 1749 break 1750 } 1751 } 1752 if !found { 1753 return false 1754 } 1755 } 1756 1757 return true 1757 return uc.supportsSASL(uc.network.SASL.Mechanism) 1758 1758 } 1759 1759
Note:
See TracChangeset
for help on using the changeset viewer.