bmgriner
14 years agoFrequent Contributor
Rest Services hitting endpoint twice
I have been observing, for the last couple of months, that when I hit different endpoints with my rest services that I get double the traffic. Even when I hit an application running on localhost that I know is not being hit by anyone else I see it being hit twice. I have observed this mostly through putting debug points in the application running the rest web service. I observe the same debug points getting hit twice.
This last time I observed that the header for both of the hits is actually different. The most notable difference I found was the following:
1st time through :- user-agent: Jakarta Commons-HttpClient/3.1
2nd time through :- user-agent:Mozilla/5.0 (Windows; U; Windows NT 6.1: en-US; rv:1.9.2) Gecko
Is there some setting I have turned on or off that prevents this from happening. It is a real annoyance and often causes tests to fail. Depending on which call goes first the test will pass or fail. I have also observed that sometimes the 2nd hit on the server will even use a different http method. I'm trying to do a POST and the second time uses a GET.
This last time I observed that the header for both of the hits is actually different. The most notable difference I found was the following:
1st time through :- user-agent: Jakarta Commons-HttpClient/3.1
2nd time through :- user-agent:Mozilla/5.0 (Windows; U; Windows NT 6.1: en-US; rv:1.9.2) Gecko
Is there some setting I have turned on or off that prevents this from happening. It is a real annoyance and often causes tests to fail. Depending on which call goes first the test will pass or fail. I have also observed that sometimes the 2nd hit on the server will even use a different http method. I'm trying to do a POST and the second time uses a GET.