Skip to content
Browse files

case insentive regexps for headers rewriting

  • Loading branch information...
1 parent 899bf0e commit 676e27b1e28268ffe817d0e576c423adb067502b @nniclausse nniclausse committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/tsung/ts_utils.erl
View
4 src/tsung/ts_utils.erl
@@ -450,8 +450,8 @@ to_https({request, String}) when is_list(String) ->
Body = string:substr(String, EndOfHeader + 4),
ReOpts=[global,{return,list}],
TmpHeader = re:replace(Header,"http://-","https://",ReOpts),
- TmpHeader2 = re:replace(TmpHeader,"Accept-Encoding: [0-9,a-zA-Z_ ]+\r\n","",ReOpts),
- RealHeader = re:replace(TmpHeader2,"Host: -","Host: ",ReOpts),
+ TmpHeader2 = re:replace(TmpHeader,"Accept-Encoding: [0-9,a-z_ ]+\r\n","",ReOpts++[caseless]),
+ RealHeader = re:replace(TmpHeader2,"Host: -","Host: ",ReOpts++[caseless]),
RealBody = re:replace(Body,"http://-","https://",ReOpts),
RealString = RealHeader++ "\r\n" ++ RealBody,
{ok, RealString}.

0 comments on commit 676e27b

Please sign in to comment.
Something went wrong with that request. Please try again.