TT#81700 generate_test_tt2.pl should escape `+' in Accept: header

Script bin/generate_test_tt2.pl is not able to generate proper regexp
from a mixed Accept header field like for example:

Accept: application/pidf+xml

In this case there is no substitution and the final .tt2 file
does not escape the `+' sign causing the following test to fail
even if user agent are sendind the correct header.

Change-Id: I2a1d66d3482a8c87d9bf09bb2665951aa42c4722
mr9.3.1
Alessio Garzi 5 years ago
parent d7386d577d
commit fd584dbb21

@ -164,6 +164,8 @@ sub subst_common
$line =~ s/expires=\d+/expires=\\d+/;
} elsif($line =~ /sip:pre_announce\@app\.local:\d+/ ) {
$line =~ s/app\.local:\d+/app.local:\\d+/;
} elsif($line =~ /^Accept: [^+]*\+.*/i ) {
$line =~ s/^Accept: ([^+]*)\+(.*)/Accept: ${1}\\\+${2}/;
}
if($line =~ /127\.0\.0\.1(:|;port=)508[08]/) {

Loading…
Cancel
Save