| || |
HTTP codes 200 vs. 304
I have a question that I'd like some help with:
I am using openSTA to test a web application that contains surveys/questionnaires. I've created scripts that fill out individual surveys and submits them. The scripts that I created initially generated HTTP results status 304 (or 302) and after running the scripts, I could view the responses from the survey through the web app that I'm testing (this is part of the webapp). However, several scripts that I have not changed are run the next day or so and now generate HTTP codes 200. When this happens, the responses that the script should generate aren't received by the webapp. I've looked at the HTTP codes but this doesn't help me much.
So my question is: Why do the codes change? Could it be due to a change in the webapp (like a redeployment of the application)? Or is it a time-related issue? Is there any way to ensure that I always receive 304 codes (because this code seems to indiciate that the responses will be received by the webapp)? I realize that this is not exactly what openSTA is for, but I'd like this to work, if possible.
Thanks in advance,
Re: HTTP codes 200 vs. 304
Just for reference.. the HTTP return codes you mention are:
200 - OK
302 - Moved Temporarily
304 - Not Modified
A '200' is your normal web response and a '304' means the web server does not need to serve you a copy since you already have a local copy (in cache or simulated cache). You should only get 304's for static files, not stuff that generates dynamic content on the server. I don't know why you would be getting 302's.
A good place to start hunting down your problems is the web server logs. All of these requests should be logged in the access logs on the server.