Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed3.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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'debug': 0.07; "client's": 0.09; 'properly.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'context:': 0.16; 'etc?': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reinvent': 0.16; 'subject:proxy': 0.16; 'substitute': 0.16; 'twisted': 0.16; 'seems': 0.21; 'cloud': 0.22; 'header:User- Agent:1': 0.23; 'proxy': 0.24; 'replace': 0.24; 'header:X -Complaints-To:1': 0.27; 'host': 0.29; "doesn't": 0.30; 'work.': 0.31; 'requests': 0.31; 'anyone': 0.31; 'stuff': 0.32; 'could': 0.34; 'created': 0.35; 'etc': 0.35; 'test': 0.35; 'but': 0.35; 'done': 0.36; 'server': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'save': 0.62; 'complete': 0.62; 'our': 0.64; 'great': 0.65; 'received:109': 0.72; 'wheel': 0.84; 'kit': 0.97 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Robin Becker Subject: substituting proxy Date: Mon, 29 Jul 2013 11:00:16 +0100 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 109.174.168.73 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1375092030 news.xs4all.nl 16010 [2001:888:2000:d::a6]:58031 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51429 Before attempting to reinvent the wheel has anyone created an http(s) proxy that can replace the content for specific requests. Context: I have access to the client's test site, but a lot of the requests are dynamic and save html complete etc etc doesn't work properly. In addition lots of the content comes from a cloud server which seems to object unless I take great care over spoofing of host names & referrers etc. I would like to debug stuff we supply, but that's hard unless I have the whole kit & kaboodle. I thought a proxy that could substitute for our javascript file(s) might work. Has anyone done this in twisted pymiproxy etc etc? -- Robin Becker