[Kamailio-Users] $cl value when there is no "Content-Length" header
Daniel-Constantin Mierla
miconda at gmail.com
Wed May 27 14:38:10 CEST 2009
Hello,
On 05/27/2009 12:43 PM, Iñaki Baz Castillo wrote:
> Hi, if a UDP response has no "Content-Length" header (so it's 0),
> which would be the value of $cl variable?
>
if the header is missing, the value is set to null. Maybe is better to be 0.
> This is, if I do:
>
> if ( $cl != 0 ) ...
>
> will this "if" match when the message has no "Content-Length" header?
>
>
> Another question: In case "Content-Lenght: 22" but the real message
> body is 33, which value will $cl report?
>
the value is taken from header. Basically $cl is more or less an alias
to $hdr(Content-Lenght).
I see a need for one PV returning the real size of the content rather
than content of the CL header.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com/
More information about the Users
mailing list