[Tsung] tsung recorder and HTTPS
Isaac Uribe
isaac.uribe at gmail.com
Wed Jan 16 17:47:02 CET 2008
Well, the grep output looks fine to me, I don't know what might your
problem be, maybe you are typing some extra stuff on the address bar
when recording, had a typo on source code...
To bypass firefox and be sure the proxy is working fine, try this:
#On console 1 start recorder
tsung recorder debug
#On console 2, tail the file created by the recorder, in my case it was:
tail -f .tsung/tsung_recorder20080116-16\:34.xml
#On console 1, telnet to your proxy recorder
telnet <your machine ip> 8090
#You should see something like:
Trying <your machine ip>...
Connected to <your machine name, if /etc/hosts and/or dns is working
fine> (<your machine ip>).
Escape character is '^]'.
#Now, type:
GET http://ssl-stuff.com HTTP/1.0
#Hit enter (you won't see anything here), but
#On console 2, you should see (if proxy is working fine):
<request><http url='https://stuff.com' version='1.0'
method='GET'></http></request>
#If that worked as describe, your tsung proxy is working fine, you've
got a problem with the web browser or your site's configuration
#Now, try doing the same, but with your real http://ssl-your.site.web
and check what happens, if "http://ssl-" gets translated to "https://"
as expected, maybe your web browser is miss-configured...
These are the exact lines that you should have modified:
cd tsung-1.2.1
#Try this command to check it matches
grep -nRHi ./ -e "ssl-"
#3 lines changed on "ts_utils.erl"
./src/tsung/ts_utils.erl:351:to_https({url, "http://ssl-"++Rest})->
"https://" ++ Rest;
./src/tsung/ts_utils.erl:355: {ok,TmpString,_} =
regexp:gsub(String,"http://ssl-","https://"),
#1 line changed on "ts_proxy_http.erl"
./src/tsung/ts_utils.erl:363: {ok,NewString,RepCount} =
regexp:gsub(String,"https://","http://ssl-"),
./src/tsung_recorder/ts_proxy_http.erl:163:check_serversocket(Socket,
"http://ssl-" ++ Rest, ClientSock) ->
On 1/16/08, philippe vanderstraeten <phvander at gmail.com> wrote:
> Thanks for your answer,
>
>
>
>
> Here are what I got greping tsung
>
> [pvander at john extractedfiles]$ grep -i -e "ssl-"
> ./tsung-1.2.1/src/tsung/ts_utils.erl
> to_https({url, " http://ssl-"++Rest})-> "https://" ++ Rest;
> {ok,TmpString,_} = regexp:gsub(String,"http://ssl-","https://"),
> {ok,NewString,RepCount} = regexp:gsub(String,"https://"," http://ssl-"),
> [pvander at john extractedfiles]$ grep -i -e "ssl-"
> ./tsung-1.2.1/src/tsung/ts_utils.erl
> to_https({url, "http://ssl-"++Rest})-> "https://" ++ Rest;
> {ok,TmpString,_} = regexp:gsub(String,"http://ssl-","https://"),
> {ok,NewString,RepCount} = regexp:gsub(String,"https://","http://ssl- "),
> [pvander at john extractedfiles]$ grep -i -e "ssl-"
> ./tsung-1.2.1/src/tsung/ts_utils.erl | grep ssl-ssl
> [pvander at john extractedfiles]$ grep -i -e "ssl-"
> ./tsung-1.2.1/src/tsung/ts_utils.erl | grep ssl.ssl
> [pvander at john extractedfiles]$ grep -i -e "ssl-"
> ./tsung-1.2.1/src/tsung/ts_utils.erl | grep "ssl\.ssl"
> [pvander at john extractedfiles]$ grep -i -e "ssl-"
> ./tsung-1.2.1/src/tsung_recorder/ts_proxy_http.erl
> check_serversocket(Socket, "http://ssl-" ++ Rest, ClientSock) ->
>
>
>
>
> On Jan 15, 2008 4:19 PM, Isaac Uribe < isaac.uribe at gmail.com> wrote:
> > That's strange, maybe you typed the replace commands twice?
> >
> > Check with:
> >
> > grep -i -e "ssl-" ./tsung-1.2.1/src/tsung/ts_utils.erl
> > grep -i -e "ssl-"
> ./tsung-1.2.1/src/tsung_recorder/ts_proxy_http.erl
> >
> > You will get the lines that contain "ssl-", and my guess is you will
> > see something like:
> >
> > ...code...http://ssl-ssl-...more...code
> >
> > Anyways, I checked using "http://ssl-ssl-host.com.mx" on Firefox
> > 2.0.0.6 (Windows) and it does not complain.
> >
> > What is the full host name you are using that is being rejected?
> >
> >
> >
> >
> > On 1/15/08, philippe vanderstraeten < phvander at gmail.com> wrote:
> > > Isaac,
> > >
> > > Thanks for your help.
> > > I have made the change you ask me todo.
> > > Its better....but... I got an URL like: http://ssl-ssl...... which have
> been
> > > rejected by firefox.
> > > Do you know whats happened ?
> > >
> > >
> > >
> > > On Jan 6, 2008 7:07 PM, Isaac Uribe <isaac.uribe at gmail.com > wrote:
> > > > Yes, it's possible to mix http with https, but with https, there is a
> > > > "feature" with recent browsers, they check the URL to be a valid
> > > > domain name, and the "{" prefix that tsung recorder uses makes the URL
> > > > invalid.
> > > >
> > > > Nicolas already fixed that on subversion:
> > > >
> > >
> https://support.process-one.net/browse/TSUN-39?page=com.atlassian.jira.plugin.ext.subversion:subversion-commits-tabpanel
> > > >
> > > > That means, you have to either dowload the latest code or make the
> > > > following changes to your copy:
> > > >
> > > > #In files:
> > > > ./tsung-1.2.1/src/tsung/ts_utils.erl
> > > > ./tsung-1.2.1/src/tsung_recorder/ts_proxy_http.erl
> > > >
> > > > #Change:
> > > > "//{" with "//ssl-"
> > > > "%7B" -> "%073%073%033"
> > > >
> > > > #vi search and replace on every file:
> > > > :%s/\/\/{/\/\/ssl-/g
> > > > :%s/%7B/%073%073%033/g
> > > >
> > > > #./configure; make; make install
> > > >
> > > > This way, tsung will use the prefix "ssl-" instead of "{", making it a
> > > > "valid" host name.
> > > >
> > > >
> > > >
> > > >
> > > > On 1/4/08, philippe vanderstraeten < phvander at gmail.com> wrote:
> > > > > Hello,
> > > > >
> > > > > I am trying to record a scenario with tsung recorder on a web site
> which
> > > > > mixed HTTP and HTTPS links. When I click on a HTTPS link, I got an
> error
> > > > > from my browser because it does not recognize the request prefix:
> > > HTTP://{
> > > > >
> > > > > My question is: is it possible to record a scénario mixing HTTP &
> HTTPS
> > > or
> > > > > do I need to record only in HTTP and then changing urls in my xml
> > > scenario?
> > > > >
> > > > > Thanks for your help.
> > > > > Best regards.
> > > > >
> > > > > _______________________________________________
> > > > > Tsung-users mailing list
> > > > > Tsung-users at lists.process-one.net
> > > > >
> > >
> https://lists.process-one.net/mailman/listinfo/tsung-users
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Isaac,
> > > >
> > > > "Limit" is a state of mind....
> > > > _______________________________________________
> > > > Tsung-users mailing list
> > > > Tsung-users at lists.process-one.net
> > > >
> > >
> https://lists.process-one.net/mailman/listinfo/tsung-users
> > > >
> > >
> > >
> >
> >
> > --
> >
> >
> >
> > Isaac,
> >
> > "Limit" is a state of mind....
> >
>
>
--
Isaac,
"Limit" is a state of mind....
More information about the Tsung-users
mailing list