Re: Message-id management revisited

From: Mark Taylor <m.b.taylor-at-bristol.ac.uk>
Date: Thu, 5 Jun 2008 13:41:11 +0100 (BST)


On Thu, 5 Jun 2008, Alasdair Allan wrote:

>> (but note: if I understand correctly, your implementation would *seem* to
>> require for correct operation that the msg-id generated by the sender
>> starts with the string "msg-id:" - this is not good.
>
> Nope. The hub-msg-id will always have a msg-id: infront of it, but the regexp
> just removes the msg-id: which my clients stick infront of their id string.
> It doesn't require that it's there. If it isn't the regexp doesn't do
> anything.

Agreed the

    $hub_msg_id =~ s/msg-id://;

in your call() implementation is in itself harmless. But when you reassemble the sender-msg-id in your reply() implementation you try to undo that step:

    $msg_id = "msg-id:" . $msg_id;

and if the original didn't start with "msg-id:" then the msg-id that you pass back to the client using receiveResponse() will have the wrong value.

-- 
Mark Taylor   Astronomical Programmer   Physics, Bristol University, UK
m.b.taylor@bris.ac.uk +44-117-928-8776 http://www.star.bris.ac.uk/~mbt/
Received on 2008-06-05Z14:41:13