[sr-dev] Header parsing/processing problem

Peter Dunkley peter.dunkley at crocodile-rcs.com
Thu Oct 25 20:58:44 CEST 2012


Hi,

When adding the oma.xcap-directory auid support to xcap_server I
couldn't get the following bit of code (in
xcap_server.c:xcaps_get_directory()) to work:

      while (hdr != NULL)
        {
                if (cmp_hdrname_strzn(&hdr->name, "Host", 4) == 0)
                {
                        server_name = hdr->body;
                        break;
                }
                hdr = hdr->next;
        }

The host header was never found.  However, simply putting
'xdbg("$hdr(Host)\n");' in event_route[xhttp:request] made it start
working.

Have I missed something in the code, or is this a bug?

Regards,

Peter


-- 
Peter Dunkley
Technical Director
Crocodile RCS Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20121025/147dc088/attachment.htm>


More information about the sr-dev mailing list