SIPServer can incorrectly calculate output message length, which can lead to clients hanging
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SIPServer |
Confirmed
|
Medium
|
Jeff Godin |
Bug Description
When writing an output message, SIPServer can incorrectly calculate the length of the message, resulting in an incomplete message being sent. Since the message lacks the SIP2 Message Terminator character (CR, 0x0d), client behavior is unpredictable. Some clients will hang.
The issue seems to stem from a bytes vs characters mismatch here:
my $rv = POSIX::
One common trigger is poorly-encoded characters present in a title or author field, either due to malformed marcxml or due to a potential encoding issue elsewhere (in the MODS transform used for mvr objects).
This probably impacts the output message corresponding with most messages that expect an author or title, including (but probably not limited to):
17
64 + fine_details
64 + hold_items
64 + unavail_holds
A properly placed "use bytes;" appears to result in length() returning a correct value, and does not appear to create other side effects.
Another fix for this may be related to work being done in bug 1542495 and/or bug 1463943, which may change the way that encodings are handled in general within SIPServer.