BugReport: registration is flawed in presence proxy
niepin <[email protected]> Tue, 16 Jan 2007 09:00:10 +0000 (UTC)
| Newsgroups | gmane.comp.voip.nist-sip |
|---|---|
| Message-ID | <[email protected]> |
Hi,
The JAIN-SIP 1.1 proxy, presence server has a bug when processing the
register requests. It does not copy the ExpiresHeader and ContactHeader
from the original request to the response.
In the line: 367
Response response = messageFactory.createResponse(Response.OK, request);
In the API (Response createResponse(int statusCode, Request request)
throws ParseException)), it says "This new Response does not contain a body.
Only the required headers are copied from the Request."
So I guess the ExpiresHeader and ContactHeader are ignored in this method.
However, the ExpiresHeader is necessary for the UA to deal with register OK
correctly. In the applet phone
\src\gov\nist\applet\phone\ua\MessageProcessor.java
line: 681-696. Without the ExpiresHeader, the state of the registration
process cannot be set.
I added a few lines in the Registrar.java at the proxy side as follows:
after the line 367
if(request.getHeader(ExpiresHeader.NAME) != null)
{
response.addHeader(request.getHeader(ExpiresHeader.NAME));
}
Now, the ua seems OK. Btw, the same problem happened on some other
developers (e.g. http://forum.java.sun.com/thread.jspa?messageID=9442926).
Could we improve the method createResponse(int statusCode, Request request)
throws ParseException to copy all headers from the orginal request?
I think it is also good for the integrity checking if someone uses the
integrity code by hashing all headers.
BR
niepin