Giter Site home page Giter Site logo

Comments (4)

sgodin avatar sgodin commented on June 3, 2024

Sorry for the slow response. We will leave this issue open, until someone has a chance to investigate.
Scott

from resiprocate.

cyr2242 avatar cyr2242 commented on June 3, 2024

Hi, IMHO the contact header in responses from the UAS carries the uri to be used in the following requests but only for the current dialog. Due the OPTIONS requests are, by default, out of a dialog, it won't have any sense to answer with a different uri if the first OPTIONS request was able to reach, unless you want to comunicate, for example, a redirection with a 3XX response: https://datatracker.ietf.org/doc/html/rfc3261#section-11.2. In this case, the overwriting of the contact header in responses to OPTIONS might be allowed, therefore the comments: "Contact header is not required for Requests that do not form a dialog" at line 1091 of Dialog.cxx and "in general, this should not create a Contact header since only requests ... " at line 359 of Helper.cxx (Helper::makeResponse method) are nearly a little wrong and maybe it would be possible to do some kind of treatment with the contact header in the response to OPTIONS at that point. Just my 2 cents. Regards.

from resiprocate.

rjjkm avatar rjjkm commented on June 3, 2024

To reiterate, the use case is running from a containerized environment. For example, the UAC sends an OPTIONS request to a K8s NodePort address which get routed to a SIP UAS container application. To allow routing back to the UAC the Contact header in the response must be set to the K8s NodePort address and not the container's address. The latter is not visible to the UAC.

I have worked around the issue by replacing the Contact header with the MasterProfile host and port override:
// Replace the stack generated Contact header with the override
response->header(resip::h_Contacts).front() = resip::NameAddr(m_dum->getMasterProfile()->getOverrideHostAndPort());

I am okay with using the workaround however if this not accepted as a defect I would suggest clarifying the documentation/code comments since the Options response is not entirely based on current MasterProfile settings.

Thank you

from resiprocate.

sgodin avatar sgodin commented on June 3, 2024

from resiprocate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.