No subject
Mon Dec 27 18:28:28 CET 2010
361" ) resulting in the next messages on OpenSIPs debug and ending the call
without even forwarding the first Invite:
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:core:parse_content_length: parse error near char [54][6]
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: ERROR:core:get_hdr_field:
bad content_length header
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: INFO:core:parse_headers:
bad header field
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:nathelper:extract_body: failed to get the message body
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:nathelper:fix_nated_sdp_f: cannot extract body from msg!
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:core:parse_content_length: parse error near char [54][6]
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: ERROR:core:get_hdr_field:
bad content_length header
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: INFO:core:parse_headers:
bad header field
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: ERROR:core:pv_get_hdr:
error parsing headers
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:core:parse_content_length: parse error near char [54][6]
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: ERROR:core:get_hdr_field:
bad content_length header
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: INFO:core:parse_headers:
bad header field
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:auth:find_credentials: failed to parse headers
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: ERROR:auth:pre_auth: failed
to find credentials
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:core:parse_content_length: parse error near char [54][6]
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: ERROR:core:get_hdr_field:
bad content_length header
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: INFO:core:parse_headers:
bad header field
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:core:build_res_buf_from_sip_req: parse_headers failed
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:sl:sl_send_reply_helper: response building failed
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]:
ERROR:signaling:sig_send_reply_mod: failed to send reply with sl module
Jun 13 11:23:23 opensips01 /sbin/opensips[5174]: ERROR:auth:pre_auth: failed
to send 400 reply
So, what I wanted to do would be to look into the Content-Length header and
in case it has two or more values change it so it becomes valid.
Something like :
if ( is_present_hf("Content-Length") )
{
$avp(s:content-length) = $(hdr(Content-Length){s.select,1, });
if ( $avp(s:content-length) != NULL )
{
remove_hf("Content-Length");
append_hf("Content-Length: $avp(s:content-length)", "Allow");
}
}
So for now my problem is where can I change the Content-Length? In main
route I only change the forwarded message and in error_route I cannot access
the headers.
Can anyone shed me a little light on the right direction.
Thanks for your time,
Joel Oliveira
--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Parsing-invalid-Content-Length-header-try-to-change-it-to-a-valid-one-tp6470966p6470966.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
More information about the Users
mailing list