[Mrpostman-developers] proxy handling code with owa 2003 script
Brought to you by:
chris_humphreys,
mrbook
|
From: Brian M. <bj...@gm...> - 2006-11-03 20:35:09
|
after connecting (with a proxy) to my exchange server, which uses Basic authentication, the script is trying to send the wrong request to the proxy "org.mrbook.mrpostman.generic.GenericParser","GenericParser","executeLine","3:18:35 PM","FINER","./outlook2003.script (103): Parsing 'desturl = baseurl & ""/exchange/""'", "org.mrbook.mrpostman.generic.GenericParser","GenericParser","executeLine","3:18:35 PM","FINEST","./outlook2003.script (103): desturl = "" https://mail.example.com/exchange/""", "org.mrbook.mrpostman.generic.GenericParser","GenericParser","executeLine","3:18:35 PM","FINER","./outlook2003.script (104): Parsing 'params = map(""destination"",desturl, ""username"", iif(domain=="""",user,domain & ""\\"" & user), ""password"", password)'", "org.mrbook.mrpostman.generic.GenericParser","GenericParser","executeLine","3:18:35 PM","FINEST","./outlook2003.script (104): params = [ ""password"" => ""XXXXXXXX"", ""destination"" => ""https://mail.example.com/exchange/"", ""username"" => ""bminton"" ]", "org.mrbook.mrpostman.generic.GenericParser","GenericParser","executeLine","3:18:35 PM","FINER","./outlook2003.script (105): Parsing 'status, page = post(""/exchweb/bin/auth/owaauth.dll"", params)'", "httpclient.wire.header","Wire","wire","3:18:35 PM","FINE",">> ""CONNECT mail.example.com:443 HTTP/1.1""", "httpclient.wire.header","Wire","wire","3:18:35 PM","FINE",">> ""User-Agent: Jakarta Commons-HttpClient/2.0.2[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:35 PM","FINE",">> ""Host: mail.example.com[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:35 PM","FINE",">> ""Proxy-Connection: Keep-Alive[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:35 PM","FINE",">> ""[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""HTTP/1.1 200 Connection established[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Proxy-agent: BlueCoat-Security-Appliance[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""POST /exchweb/bin/auth/owaauth.dll HTTP/1.1[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010914[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""Host: mail.example.com[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""Content-Length: 93[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""Content-Type: application/x-www-form-urlencoded[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""[\r][\n]""", "httpclient.wire.content","Wire","wire","3:18:36 PM","FINE",">> ""password=XXXXXXXX&destination=https%3A%2F%2Fmail.example.com%2Fexchange%2F&username=bminton""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""HTTP/1.1 401 Access Denied[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Server: Microsoft-IIS/5.0[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Date: Fri, 03 Nov 2006 20:18:35 GMT[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""WWW-Authenticate: Basic realm=""mail.example.com""[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Connection: close[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Content-Length: 24[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Content-Type: text/html[\r][\n]""", "org.apache.commons.httpclient.HttpMethodBase","HttpMethodBase","processAuthenticationResponse","3:18:36 PM","WARNING","No credentials available for the 'mail.example.com' authentication realm at mail.example.com", "org.mrbook.mrpostman.generic.GenericRobot","GenericRobot","post","3:18:36 PM","INFO","./outlook2003.script: Response 401 for request 'POST https://mail.example.com/exchweb/bin/auth/owaauth.dll'", "httpclient.wire.content","Wire","wire","3:18:36 PM","FINE","<< ""Error: Access is Denied.""", "org.mrbook.mrpostman.generic.GenericParser","GenericParser","executeLine","3:18:36 PM","FINEST","./outlook2003.script (105): status = 401.0", "org.mrbook.mrpostman.generic.GenericParser","GenericParser","executeLine","3:18:36 PM","FINEST","./outlook2003.script (105): page = ""Error: Access is Denied.""", "org.mrbook.mrpostman.generic.GenericParser","GenericParser","executeLine","3:18:36 PM","FINER","./outlook2003.script (106): Parsing 'if (status != 200)'", "org.mrbook.mrpostman.generic.GenericParser","GenericParser","executeLine","3:18:36 PM","FINER","./outlook2003.script (107): Parsing '# sometimes log in is by accessing the home page and basic authorization'", "org.mrbook.mrpostman.generic.GenericParser","GenericParser","executeLine","3:18:36 PM","FINER","./outlook2003.script (108): Parsing 'addcredentials(iif(domain=="""",user,domain&""\\""&user),password)'", "org.mrbook.mrpostman.generic.GenericParser","GenericParser","executeLine","3:18:36 PM","FINEST","./outlook2003.script (108): Calling addcredentials({ ""bminton"", ""XXXXXXXX"" })", "org.mrbook.mrpostman.generic.GenericParser","GenericParser","executeLine","3:18:36 PM","FINER","./outlook2003.script (109): Parsing 'status, page = get(baseurl)'", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""CONNECT mail.example.com:443 HTTP/1.1""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""User-Agent: Jakarta Commons-HttpClient/2.0.2[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""Host: mail.example.com[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""Proxy-Connection: Keep-Alive[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""HTTP/1.1 200 Connection established[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Proxy-agent: BlueCoat-Security-Appliance[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""GET / HTTP/1.1[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010914[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""Host: mail.example.com[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""HTTP/1.1 302 Object Moved[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Location: https://mail.example.com/exchange[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Server: Microsoft-IIS/5.0[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Content-Type: text/html[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Content-Length: 158[\r][\n]""", "httpclient.wire.content","Wire","wire","3:18:36 PM","FINE","<< ""<head><title>Document Moved</title></head>[\n]""", "httpclient.wire.content","Wire","wire","3:18:36 PM","FINE","<< ""<body><h1>Objec""", "httpclient.wire.content","Wire","wire","3:18:36 PM","FINE","<< ""t Moved</h1>This document may be found <a HREF="" https://mail.example.com/exchange"">here</a></body>""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""GET /exchange HTTP/1.1[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010914[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""Host: mail.example.com[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""HTTP/1.1 401 Access Denied[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Server: Microsoft-IIS/5.0[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Date: Fri, 03 Nov 2006 20:18:35 GMT[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""WWW-Authenticate: Basic realm=""mail.example.com""[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Connection: close[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Content-Length: 24[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Content-Type: text/html[\r][\n]""", "httpclient.wire.content","Wire","wire","3:18:36 PM","FINE","<< ""Error: Access is Denied.""", ok, so far so good. Now the problem: "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""GET https://mail.example.com/exchange HTTP/1.1[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010914[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""Host: mail.example.com[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""Authorization: Basic xxxxxxxxxxxxxxxxxxxxxx==[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""Proxy-Connection: Keep-Alive[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE",">> ""[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""HTTP/1.1 400 Bad Request[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Cache-Control: no-cache[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Pragma: no-cache[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Content-Type: text/html[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Proxy-Connection: close[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Connection: close[\r][\n]""", "httpclient.wire.header","Wire","wire","3:18:36 PM","FINE","<< ""Content-Length: 1262[\r][\n]""", Once it has the auth calculated, it is doing a proxy request wrong, sending "GET https://..." rather than "GET / (if necessary using "CONNECT" first) followed by "Host: " |