Bug #1011
CTCP requests are not sent correctly
100%
Description
CTCP requests have an extra whitespace character in the message sent to the server. This causes some clients (such as X-Chat) to fail to recognize the standard CTCP requests, such as "VERSION", because they do not strip the whitespace from the received CTCP request, "VERSION ".
Marked this as core, though I'm not sure whether the client or the core is responsible here.
Associated revisions
improved ctcp handler method, fixes #1011
do not add space in ctcp handler method pack if message is empty
History
#1 Updated by Anonymous over 14 years ago
i think the space comes from the non-existent 'message' after VERSION;
in src/core/ctcphandler.cpp(164) pack() is defined: return XDELIM + ctcpTag + ' ' + xdelimQuote(message) + XDELIM;
in src/core/ctcphandler.cpp(170) in query() one can find the following line
params << serverEncode(bufname) << lowLevelQuote(pack(serverEncode(ctcpTag), userEncode(bufname, message)));
here ctcpTag = 'VERSION' and message is whatever section() gives for empty stuff, see http://doc.trolltech.com/3.3/qstring.html#section
so to fix it, one would have to check whether message is empty and if so, don't pack it (i think)
#2 Updated by Anonymous over 14 years ago
i think the space comes from the non-existent 'message' after VERSION;
in src/core/ctcphandler.cpp(164) pack() is defined: return XDELIM + ctcpTag + ' ' + xdelimQuote(message) + XDELIM;
in src/core/ctcphandler.cpp(170) in query() one can find the following line
params << serverEncode(bufname) << lowLevelQuote(pack(serverEncode(ctcpTag), userEncode(bufname, message)));
here ctcpTag = 'VERSION' and message is whatever section() gives for empty stuff, see http://doc.trolltech.com/3.3/qstring.html#section
so to fix it, one would have to check whether message is empty and if so, don't pack it (i think)
#3 Updated by johu over 14 years ago
- Status changed from New to Assigned
- Assignee set to johu
- Priority changed from Normal to Low
- Target version set to 0.6.2
- Version changed from 0.7-pre to 0.6.1
#4 Updated by johu over 14 years ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
Applied in changeset 9e4d32bf1a0a942c28b30901e7da196ab3ebfad5.
improved ctcp handler method, fixes #1011
do not add space in ctcp handler method pack if message is empty