Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:error': 0.03; 'debugging': 0.07; 'cookie': 0.09; 'host,': 0.09; 'cc:addr:python- list': 0.11; 'python': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'luck!': 0.16; 'script,': 0.16; 'sorts': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'things.': 0.19; 'cc:addr:python.org': 0.22; 'load': 0.23; 'headers': 0.24; 'header': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'login': 0.25; 'script': 0.25; 'compare': 0.26; 'right.': 0.26; 'header:In-Reply- To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'request,': 0.31; 'figure': 0.32; 'checking': 0.33; 'maybe': 0.34; 'could': 0.34; 'test': 0.35; 'received:google.com': 0.35; 'application': 0.37; 'so,': 0.37; 'two': 0.37; 'being': 0.38; 'pm,': 0.38; 'previous': 0.38; 'does': 0.39; 'browser': 0.61; 'first': 0.61; 'box,': 0.64; 'grab': 0.64; 'side': 0.67; 'facilities': 0.69; 'login,': 0.84; 'try.': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=FY8Bs8Szggw6NFXZYufpMIvsOkzKEApRKZ4pngZ62fk=; b=vf4LzSoWx1ktTcvRSp6vUc0ZPsTtGeTQwC7/e/dl5i58b16fYT/VvBbpEJ43NKzyJa tWdDDLn85WMkPawXGCXKyksMMH5NUNtwrsHzKZQhPGR8kjvo7DCefbtcWDjQ60c9SMr0 xGSmJZTkYDFxz9G6+Z3sgL4JAppkbh7W5r3tDVjHxjltWKVNBPD6LpFjecP50EDbMG/8 bT4+W93G3nuj89C0+49uYUiYhG9rJioqseEmqrOJ+X5jDSi6rkBARGUv/yEwY31/T4h8 41BrjQtexKXyV5jkNmef9GH6GU0x3pGfQaWHXMyvbtC21nmCAsZKsOAeDZDYOi8cEA7u MNyA== MIME-Version: 1.0 X-Received: by 10.42.142.201 with SMTP id t9mr328408icu.60.1414388081295; Sun, 26 Oct 2014 22:34:41 -0700 (PDT) In-Reply-To: <04b6b33f-885e-4e4a-b458-b258b34fbb90@googlegroups.com> References: <82d4292e-10de-4d47-882e-bab75777fbfe@googlegroups.com> <04b6b33f-885e-4e4a-b458-b258b34fbb90@googlegroups.com> Date: Mon, 27 Oct 2014 16:34:41 +1100 Subject: Re: 403 forbidden error From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1414388091 news.xs4all.nl 2881 [2001:888:2000:d::a6]:56220 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:79765 On Mon, Oct 27, 2014 at 4:12 PM, Diya Rai 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