Hi,

o Jeremy A [07/15/09 12:22]:
Hi,

Working with 1.1.1 I have observed that the header "Content-Type" in an
AmSipRequest is not available when accessing it by

getHeader ( req.hdrs,  "Content-Type" )

That call returns an empty string

It is however available in req.content_type
the control plugins were changed some time ago to use the property content_type instead of adding this to the extra headers. In most places, the code still checks for Content-Type in extra headers, if req.content_type is not present.

This will be removed in trunk, where unixsockctrl is gone.


I imagine it has been removed from req.hdrs during initial parsing and
assignment - perhaps for efficiency?
it is parsed by both sipctrl and ser(binrpcctrl), so no need to add it again and parse it again from headers.


This will result in failure in

apps/announce_transfer/AnnounceTransfer.cpp:      if
((strip_header_params(getHeader(req.hdrs,"Content-Type"))

Which should now be

apps/announce_transfer/AnnounceTransfer.cpp:      if
((strip_header_params(getHeader( req.content_type ))
Thanks, I have fixed this with a small bunch of other issues with announce_transfer.


There are a few other locations where the Content-Type header is
accessed that may (?)  have similar problems.

core/AmSession.cpp:     (strip_header_params(getHeader(req.hdrs,
"Content-Type"))
here the content_type property is checked before

core/AmB2BSession.cpp:    //string content_type =
getHeader(reply.hdrs,"Content-Type");
here the content_type property is now checked as well

core/AmB2BSession.cpp:    content_type =
getHeader(callee_reply.hdrs,"Content-Type", "c");
core/plug-in/unixsockctrl/UnixSocketAdapter.cpp:  reply.content_type =
getHeader(reply.hdrs,"Content-Type");
should now be fixed as well

Thanks for reporting!
Stefan


_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems

--
Stefan Sayer
VoIP Services

[email protected]
www.iptego.com

IPTEGO GmbH
Wittenbergplatz 1
10789 Berlin
Germany

Amtsgericht Charlottenburg, HRB 101010
Geschaeftsfuehrer: Alexander Hoffmann
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems

Reply via email to