[OpenSER-Users] publish with empty body

Juha Heinanen jh at tutpro.com
Tue Dec 18 11:21:50 CET 2007


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









More information about the sr-users mailing list