mirror of
https://github.com/progval/irctest.git
synced 2025-04-08 00:09:46 +00:00
Merge pull request #46 from slingamn/inputtoolong.1
allow ERR_INPUTTOOLONG if a PRIVMSG cannot be relayed
This commit is contained in:
@ -108,6 +108,7 @@ class MessageTagsTestCase(cases.BaseServerTestCase, cases.OptionalityHelper):
|
|||||||
self.assertEqual(alice_msg.tags["msgid"], bob_msg.tags["msgid"])
|
self.assertEqual(alice_msg.tags["msgid"], bob_msg.tags["msgid"])
|
||||||
|
|
||||||
@cases.mark_capabilities("message-tags")
|
@cases.mark_capabilities("message-tags")
|
||||||
|
@cases.mark_specifications("ircdocs")
|
||||||
def testLengthLimits(self):
|
def testLengthLimits(self):
|
||||||
self.connectClient(
|
self.connectClient(
|
||||||
"alice",
|
"alice",
|
||||||
@ -154,6 +155,13 @@ class MessageTagsTestCase(cases.BaseServerTestCase, cases.OptionalityHelper):
|
|||||||
self.assertEqual(len(max_privmsg), 4096 + (512 - 2))
|
self.assertEqual(len(max_privmsg), 4096 + (512 - 2))
|
||||||
self.sendLine("alice", max_privmsg)
|
self.sendLine("alice", max_privmsg)
|
||||||
echo = self.getMessage("alice")
|
echo = self.getMessage("alice")
|
||||||
|
# the server may still reject this message on the grounds that the final
|
||||||
|
# parameter is too long to be relayed without truncation, once alice's
|
||||||
|
# NUH is included. however, if the message was accepted, the tags MUST
|
||||||
|
# be relayed intact, because they are unquestionably valid. See the
|
||||||
|
# original context of ERR_INPUTTOOLONG:
|
||||||
|
# https://defs.ircdocs.horse/defs/numerics.html#err-inputtoolong-417
|
||||||
|
if echo.command != ERR_INPUTTOOLONG:
|
||||||
relay = self.getMessage("bob")
|
relay = self.getMessage("bob")
|
||||||
self.assertMessageMatch(
|
self.assertMessageMatch(
|
||||||
echo,
|
echo,
|
||||||
|
Reference in New Issue
Block a user