403 forbidden error

Diya Rai diyaraik at gmail.com
Mon Oct 27 01:56:43 EDT 2014


On Monday, October 27, 2014 11:05:04 AM UTC+5:30, Chris Angelico wrote:
> On Mon, Oct 27, 2014 at 4:12 PM, Diya Rai <diyaraik at gmail.com> wrote:
> > This is the part of the code which im trying to execute. We are trying to load test a web application through python script, currently checking the login part.
> >
> 
> Does it work when you log in using a web browser? If so, grab a
> browser with debugging facilities (Firefox with Firebug, or Chrome
> with its F12 box, or something), do the login, and have a look at
> exactly what request headers are being sent. Then compare with what
> your script is doing. Once you have the two side by side, you can
> progressively work through it until you figure out which header makes
> the difference - maybe your script isn't sending Host, or maybe you
> need a cookie from a previous request, or maybe it's actually checking
> the Referer and rejecting if it isn't right. Could be all sorts of
> things.
> 
> Good luck! Might be a tedious job, or might be the first thing you try.
> 
> ChrisA

Thanks a lot ChrisA
It works fine while logging in through browser.
Im using firefox, and have checked the headers with firebug.
I tried passing all the headers and it works while passing the cookie header.
My question is whether is it the correct way to try or can i write python script in such a way that it can handle it automatically.
Currently for checking login page, it would be fine.But when we go for testing registration page it become tedious.

I would also like to get your opinion on load testing with python script.

Thanks in advance,
Diya




More information about the Python-list mailing list