Details

      Description

      It would be good if there was a way to add extra headers to those recorded by tsung-recorder. For example, we record all the following so we can accurately simulate real clients:

      diff --git a/src/tsung_recorder/ts_proxy_http.erl b/src/tsung_recorder/ts_proxy_http.erl
      index 8195d0d..6bffc4a 100644
      — a/src/tsung_recorder/ts_proxy_http.erl
      +++ b/src/tsung_recorder/ts_proxy_http.erl
      @@ -327,6 +327,20 @@ record_request(State=#state_rec{prev_host=Host, prev_port=Port, prev_scheme=Sche
      record_header(Fd,ParsedHeader,"soapaction",
      "~n <soap action='~s'></soap>~n",
      fun(A) -> string:strip(A,both,$") end ), %"
      + record_header(Fd,ParsedHeader,"accept",
      + "~n <http_header name='Accept' value='~s' />"),
      + record_header(Fd,ParsedHeader,"accept-encoding",
      + "~n <http_header name='Accept-Encoding' value='~s' />"),
      + record_header(Fd,ParsedHeader,"accept-charset",
      + "~n <http_header name='Accept-Charset' value='~s' />"),
      + record_header(Fd,ParsedHeader,"accept-language",
      + "~n <http_header name='Accept-Language' value='~s' />"),
      + record_header(Fd,ParsedHeader,"x-requested-with",
      + "~n <http_header name='X-Requested-With' value='~s' />"),
      + record_header(Fd,ParsedHeader,"cache-control",
      + "~n <http_header name='Cache-Control' value='~s' />"),
      + record_header(Fd,ParsedHeader,"pragma",
      + "~n <http_header name='Pragma' value='~s' />"),

      io:format(Fd,"</http></request>~n",[]),
      {ok,State#state_rec{prev_port=NewPort,ext_file_id=NewId,prev_host=NewHost,prev_scheme=NewScheme}}.

        Expenses

          Activity

          There are no comments yet on this issue.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development