Re: [Paste] Webob Request, specifying proxy server

Top Page
Author: Thomas G. Willis
Date:  
To: Paste Users
Subject: Re: [Paste] Webob Request, specifying proxy server
Thanks Ian,

I think I know what you are getting at, so I will muck around with
this and see what I can get working.


Thomas G. Willis



On Wed, Jul 28, 2010 at 11:53 AM, Ian Bicking <ianb@???> wrote:
> There's nothing about proxies in the code.  Everything goes through httplib,
> if there's a way to get httplib to do what you want then it should work.  If
> not, then it will require a patch to get it to work.  You might want to use
> wsgiproxy.exactproxy.proxy_exact_request as the basis instead.
>
> In paste.httpserver there's two environ variables:
>             paste.httpserver.proxy.scheme
>             paste.httpserver.proxy.host
>
> though I don't think those are necessarily apropos.  There just needs to be
> some way to tell proxy_exact_request to send the scheme and host in the
> request line.  You can already override what host proxy_exact_request
> connects to with environ['SERVER_NAME'].
>
> On Wed, Jul 28, 2010 at 7:51 AM, Thomas G. Willis <tom.willis@???>
> wrote:
>>
>> Hey everyone. This is probably a simple question but I'm not seeing
>> it.Work just threw up a proxy hich is breaking some of my tools built
>> around webob. The below code works fine on internal machines which is
>> expected. But making requests to external servers results in
>> get_response hanging indefinitely(i think)
>>
>> In [17]: from paste.proxy import TransparentProxy
>>
>> In [18]: app = TransparentProxy()
>>
>> In [19]: from webob import Request
>>
>> In [20]: str(Request.blank("http://altair/repo").get_response(app))
>>
>> Out[20]: '200 Script output follows\nDate: Wed, 28 Jul 2010 12:47:45
>> GMT\nServer: Apache/2.2.14 (Ubuntu)\nVary: Accept-Encoding\nContent-
>> Type: text/html; charset=ascii\n\n<!DOCTYPE html PUBLIC "-//W3C//DTD
>> XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
>> strict.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
>> lang="en">\n<head>\n ...
>>
>> In [20]: str(Request.blank("http://google.com").get_response(app))
>>
>> My guess is I have to somehow get my proxy settings in here somewhere
>> but I'll be damned if I could find it in the docs. Of course the ntlm
>> is another issue but I think I can solve that one(hopefully).
>>
>> Any ideas definitely appreciated.
>>
>>
>> Tom Willis
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Paste Users" group.
>> To post to this group, send email to paste-users@???.
>> To unsubscribe from this group, send email to
>> paste-users+unsubscribe@???.
>> For more options, visit this group at
>> http://groups.google.com/group/paste-users?hl=en.
>>
>
>
>
> --
> Ian Bicking  |  http://blog.ianbicking.org
>


-- 
You received this message because you are subscribed to the Google Groups "Paste Users" group.
To post to this group, send email to paste-users@???.
To unsubscribe from this group, send email to paste-users+unsubscribe@???.
For more options, visit this group at http://groups.google.com/group/paste-users?hl=en.