while testing a new sip ua, i noticed that at some point it sent (don't ask me why because i don't know) a publish request without any body. it was not an initial publication, because it contained SIP-If-Match header with an etag. the publication was for even package presence.
what openser presence server did was that it accepted the publish with 200 ok that contained a NEW etag value in its SIP-If-Match header.
i have been trying to find out from rfcs where this kind of behavior would have been defined, but so far without success. rfc3903 says:
5. The ESC processes the published event state contained in the body of the PUBLISH request. If the content type of the request does not match the event package, or is not understood by the ESC, the ESC MUST reject the request with an appropriate response, such as 415 (Unsupported Media Type), and skip the remainder of the steps.
in this publish content type didn't match the event package, because there was none. reading further i found this:
* If the request has no message body and contained no entity-tag, the ESC SHOULD reject the request with an appropriate response, such as 400 (Invalid Request), and skip the remainder of the steps. Alternatively, in case either ESC local policy or the event package has defined semantics for an initial publication containing no message body, the ESC MAY accept it.
but it does not apply, because the publication was not initial.
so, have i found a bug or any other ideas?
-- juha
El Tuesday 18 December 2007 11:21:50 Juha Heinanen escribió:
while testing a new sip ua, i noticed that at some point it sent (don't ask me why because i don't know) a publish request without any body.
Could you say with UA it is?
I reported a bug about "PUBLISH with empty body" but haven't got time to test it properly:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1821002...
Maybe it's related. In my report I thought that it is problem related to "pua_usrloc" but not sure of that now (as I say before I need to test and try it again).
it was not an initial publication, because it contained SIP-If-Match header with an etag. the publication was for even package presence.
what openser presence server did was that it accepted the publish with 200 ok that contained a NEW etag value in its SIP-If-Match header.
In the bug I refer Anca said:
"The pua_usrloc module sends a Publish with a body only when the initial Register arrives- it has basic status open. The next Publish messages for expire update - triggered by re-Register messages- and the final one when the client unRegisters(where Expires: 0) do not contain a body, as they represent an update for Expires and not the state previously published."
publish with empty body is refresh. it has been mentioned in an earlier section of the rfc, not (at least) clearly in the section that specifies, how server processes a publish request.
-- juha