Thanks Oleg for your reply. Could it be that the proxy is announcing just NTLM but it actually does accept BASIC auth? I mean, I could authenticate using curl:
C:\Users\musacchl\Desktop\curl\bin>curl -v --proxy-basic --proxy-user <user>:<password> --url http://www.google.com.ar --proxy http://144.72.225.21:80/ * About to connect() to proxy 144.72.225.21 port 80 (#0) * Trying 144.72.225.21... connected * Proxy auth using Basic with user '<user>' > GET http://www.google.com.ar HTTP/1.1 > Proxy-Authorization: Basic Z21wMTgwOm1hZVQwMTIz > User-Agent: curl/7.23.1 (i386-pc-win32) libcurl/7.23.1 OpenSSL/0.9.8r > zlib/1.2 .5 libidn/1.18 libssh2/1.3.0 librtmp/2.3 > Host: www.google.com.ar > Accept: */* > Proxy-Connection: Keep-Alive > < HTTP/1.1 200 OK < Date: Sun, 22 Jan 2012 22:04:21 GMT < Expires: -1 < Cache-Control: private, max-age=0 < Content-Type: text/html; charset=ISO-8859-1 < P3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/ bin/answer.py?hl=en&answer=151657 for more info." < Server: gws < X-XSS-Protection: 1; mode=block < X-Frame-Options: SAMEORIGIN < Transfer-Encoding: chunked < Proxy-Connection: Keep-Alive < Connection: Keep-Alive < Set-Cookie: PREF=ID=9003536854dee7dc:FF=0:TM=1327269861:LM=1327269861:S=itmA28 PklgxOcuZI; expires=Tue, 21-Jan-2014 22:04:21 GMT; path=/; domain=.google.com.ar < Set-Cookie: NID=56=lB4_bLrbrFvShtTIk-0X_qSQvirjPAFCzZ5wb0r1ryOXHKu8zsi2j6yvqp- EoNgthPJlwCmXR3yndoG47bKC15nJX1HgPKaN5yl0lzb14FemGCNRNqbX_IXNIl8ZOQXE; expires=M on, 23-Jul-2012 22:04:21 GMT; path=/; domain=.google.com.ar; HttpOnly < <!doctype html><html><head><meta http-equiv="content-type" content="text/html; c harset=ISO-8859-1"><title>Google</title><script>window.google={kEI:"5YccT7D0I8TI qgHI9qSlAg",getEI:function(b){var c;while(b&&!(b.getAttribute&&(c=b.getAttribute ("eid"))))b=b.parentNode;return c||google.kEI},https:function(){return window.lo cation.protocol=="https:"},kEXPI:"33552,35506,35773,35900,35952,36000,36045,3607 0",kCSI:{e:"33552,35506,35773,35900,35952,36000,36045,36070",ei:"5YccT7D0I8TIqgH I9qSlAg"},authuser:0, ml:function(){},kHL:"es-419",time:function(){return(new Date).getTime()},log:fun ction(b,c,f,h){var d=new Image,g=google,k=g.lc,i=g.li,m="";d.onerror=(d.onload=( d.onabort=function(){delete k[i]}));k[i]=d;if(!f&&c.search("&ei=")==-1)m="&ei="+ google.getEI(h);var j=f||"/gen_204?atyp=i&ct="+b+"&cad="+c+m+"&zx="+google.time( ),a=/^http:/i;if(a.test(j)&&google.https()){google.ml(new Error("GLMM"),false,{s rc:j}); delete k[i];return}d.src=j;g.li=i+1},lc:[],li:0,Toolbelt:{},y:{},x:function(b,c) {google.y[b.id]= [b,c];return false}}; window.google.sn="webhp";window.google.timers={};window.google.startTick=functio n(a,b){window.google.timers[a]={t:{start:(new Date).getTime()},bfr:!(!b)}};windo w.google.tick=function(a,b,c){if(!window.google.timers[a])google.startTick(a);wi ndow.google.timers[a].t[b]=c||(new Date).getTime()};google.startTick("load",true );try{}catch(u){} var _gjwl=location;function _gjuc(){var e=_gjwl.href.indexOf("#");if(e>=0){var a =_gjwl.href.substring(e);if(a.indexOf("&q=")>0||a.indexOf("#q=")>=0){a=a.substri ng(1);if(a.indexOf("#")==-1){for(var c=0;c<a.length;){var d=c;if(a.charAt(d)=="& ")++d;var b=a.indexOf("&",d);if(b==-1)b=a.length;var f=a.substring(d,b);if(f.ind exOf("fp=")==0){a=a.substring(0,c)+a.substring(b,a.length);b=c}else if(f=="cad=h ")return 0;c=b}_gjwl.href="/search?"+a+"&cad=h";return 1}}}return 0}function _gj p(){!(window._gjwl.hash&& window._gjuc())&&setTimeout(_gjp,500)}; window._gjp && _gjp()</script><style>#gbar,#guser{font-size:13px;padding-top:1px !important}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:ri ght}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position: absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;verti cal-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important }a.gb1,a.gb4{color:#00c !important}</style><style id=gstyle>body{margin:0;overfl ow-y:scroll}#gog{padding:3px 8px 0}td{line-height:.8em}.gac_m td{line-height:17p x}form{margin-bottom:20px}body,td,a,p,.h{font-family:arial,sans-serif}.h{color:# 36c;font-size:20px}.q{color:#00c}.ts td{padding:0}.ts{border-collapse:collapse}e m{font-weight:bold;font-style:normal}.lst{height:25px;width:496px}.gsfi,.lst{fon t:18px arial,sans-serif}.gsfs{font:17px arial,sans-serif}.ds{border-bottom:solid 1px #e7e7e7;border-right:solid 1px #e7e7e7;display:-moz-inline-box;display:inli ne-block;margin:3px 0 4px;margin-left:4px}input{font-family:inherit}a.gb1,a.gb2, a.gb3,a.gb4{color:#11c !important}body{background:#fff;color:black}a{color:#11c; text-decoration:none}a:hover,a:active{text-decoration:underline}.fl a{color:#36c }a:visited{color:#551a8b}a.gb1,a.gb4{text-decoration:underline}a.gb3:hover{text- decoration:none}#ghead a.gb2:hover{color:#fff!important}.sblc{padding-top:5px}.s blc a{display:block;margin:2px 0;margin-left:13px;font-size:11px;}.lsbb{backgrou nd:#eee;border:solid 1px;border-color:#ccc #999 #999 #ccc;height:30px;display:bl ock}.pp-new-desktop,.pp-new-mobile{color:red}.ftl,#fll a{display:inline-block;ma rgin:0 12px}.lsb{background:url(/images/srpr/nav_logo80.png) 0 -258px repeat-x;b order:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font:15px ar ial,sans-serif;vertical-align:top}.lsb:active{background:#ccc}.lst:focus{outline :none}#addlang a{padding:0 3px}.gac_v div{display:none}.gac_v .gac_v2,.gac_bt{di splay:block!important}table.gssb_c{z-index:986 }.nbcl{background:url(/images/sr pr/nav_logo80.png) no-repeat ;height:px;width:px}</style><script></script></head ><body bgcolor=#ffffff text=#000000 link=#0000cc vlink=#551a8b alink=#ff0000 onl oad="document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();if( document.images)new Image().src='/images/srpr/nav_logo80.png'" ><textarea id=csi style=display:none></textarea><div id=mngb><div id=gbar><nobr>B·sq ueda http://www.google.com.ar/imghp?hl=es&tab=wi Imßgene s http://video.google.com.ar/?hl=es&tab=wv Vφdeos http://news.google.com.ar/nwshp?hl=es&tab=wn Noticias http://translate.google.com.ar/?hl=es&tab=wT Traductor http://books.google.com.ar/bkshp?hl=es&tab=wp Libros https://mail.google.com/mail/?tab=wm Gmail http://www.google.com.ar/intl/es/options/ <u>Mßs</u> » </nobr></div><div id=guser width=100%><nobr>< /span> http://www.goog le.com/history/optout?hl=es Historial web | /preference s?hl=es-419 Configuraci≤n | https://accounts.go ogle.com/ServiceLogin?hl=es&continue=http://www.google.com.ar/ Accede r </nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0 ></div></div><center><br clear=all id=lgpd><div id=lga><div style="padding:28px 0 3px"><div align=left style="background:url(/intl/en_com/images/srpr/logo1w.png ) no-repeat;height:110px;width:276px" title="Google" id=hplogo onload="window.lo l&&lol()"><div nowrap style="color:#777;font-size:16px;font-weight:bold;left:214 px;position:relative;top:70px">Argentina</div></div></div><br></div><form action ="/search" name=f><table cellpadding=0 cellspacing=0><tr valign=top><td width=25 %> </td><td align=center nowrap><input name=hl type=hidden value=es-419><in put name=source type=hidden value=hp><input type=hidden name=ie value="ISO-8859- 1"><div class=ds style="height:32px;margin:4px 0"><input autocomplete=off maxlen gth=2048 name=q class="lst" title="Buscar con Google" value="" size=57 style="ba ckground:#fff;border:1px solid #ccc;border-bottom-color:#999;border-right-color: #999;color:#000;margin:0;padding:5px 8px 0 6px;vertical-align:top"></div><br sty le="line-height:0"><input name=btnG type=submit value="Buscar con Google" class=lsb><input name=btnI type=submit class=lsb value="Me siento con suerte"></ span></td><td nowrap width=25% align=left class="fl sblc"> /advanced_sea rch?hl=es-419 B·squeda avanzada /language_tools?hl=es-419 Herramie ntas de idioma </td></tr></table><input type=hidden id=gbv name=gbv value="1" ></form><div style="font-size:83%;min-height:3.5em"><br></div><div id=res></div> <center id=fctr><div style="font-size:10pt"><div id=fll style="m argin:19px auto;text-align:center"> /intl/es-419/ads/ Programas de publ icidad /services/ Soluciones Empresariales https://plus .google.com/112209395112018703654 +Google /intl/es- 419/about.html Todo acerca de Google http://www.google.com/ncr Google.com in English </div></div><p style="color:#767676;font-s ize:8pt">© 2012 - /intl/es-419/privacy.html Privacidad </p></c enter> <div id=xjsd></div><div id=xjsi><script>if(google.y)google.y.first =[];google.dlj=function(b){window.setTimeout(function(){var a=document.createEle ment("script");a.src=b;document.getElementById("xjsd").appendChild(a)},0)}; if(google.y)google.y.first=[];if(!google.xjs){google.dstr=[];google.rein=[];if(g oogle.timers&&google.timers.load.t){google.timers.load.t.xjsls=new Date().getTim e();}google.dlj('/extern_js/f/CgJlbhICdXMrMEU4ACwrMFo4ACwrMA44ACwrMDw4ACwrMFE4AC wrMAo4AJoCAmhlLCswmAE4ACwrMBY4ACwrMBk4ACwrMEE4ACwrME04ACwrME44ACwrMFQ4ACwrMGk4AC wrMJABOAAsKzCSATgALCsw0QE4ACwrMBg4ACwrMCY4ACyAAlCQAmE/g3ZMTpF5pbA.js');google.xj s=1}google.neegg=1;google.mc=[];google.mc=google.mc.concat([[69,{}],[14,{}],[60, {}],[81,{}],[10,{"client":"hp","dh":true,"ds":"","fl":true,"host":"google.com.ar ","jsonp":true,"msgs":{"lcky":"Me siento con suerte","lml":"Mßs informaci≤n","ps rc":"Se ha eliminado esta b·squeda de tu \u003Ca href=\"/history\"\u003EHistoria l web\u003C/a\u003E","psrl":"Eliminar","srch":"Buscar con Google"},"ovr":{"o":1, "ps":1,"sw":1},"pq":"","scd":10,"sce":5}],[152,{}],[78,{}],[25,{"g":8,"k":false, "m":{"app":true,"bks":true,"blg":true,"dsc":true,"evn":true,"flm":true,"frm":tru e,"isch":true,"klg":true,"mbl":true,"nws":true,"plcs":true,"ppl":true,"prc":true ,"pts":true,"rcp":true,"shop":true,"vid":true},"t":null}],[209,{}],[105,{}],[22, {"db":false,"m_errors":{"32":"Lo sentimos, no hay mßs resultados para mostrar.", "default":"\u003Cfont color=red\u003EError:\u003C/font\u003E el servidor no ha p odido completar tu solicitud. Vuelve a intentarlo dentro de 30 segundos."},"m_ti p":"Haz clic para obtener mßs informaci≤n","nlpm":"-153px -84px","nlpp":"-153px -70px","utp":false}],[77,{}],[146,{}],[144,{}],[84,{}],[24,{}],[38,{}]]);google. y.first.push(function(){if(google.med){google.med('init');google.initHistory();g oogle.med('history');}google.History&&google.History.initialize('/')});if(google .j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);}</script></div>< script>(function(){ var b,d,e,f;function g(a,c){if(a.removeEventListener){a.removeEventListener("loa d",c,false);a.removeEventListener("error",c,false)}else{a.detachEvent("onload",c );a.detachEvent("onerror",c)}}function h(a){f=(new Date).getTime();++d;a=a||wind ow.event;var c=a.target||a.srcElement;g(c,h)}var i=document.getElementsByTagName ("img");b=i.length;d=0;for(var j=0,k;j<b;++j){k=i[j];if(k.complete||typeof k.src !="string"||!k.src)++d;else if(k.addEventListener){k.addEventListener("load",h,f alse);k.addEventListener("error", h,false)}else{k.attachEvent("onload",h);k.attachEvent("onerror",h)}}e=b-d;functi on l(){if(!google.timers.load.t)return;google.timers.load.t.ol=(new Date).getTim e();google.timers.load.t.iml=f;google.kCSI.imc=d;google.kCSI.imn=b;google.kCSI.i mp=e;if(google.stt!==undefined)google.kCSI.stt=google.stt;google.timers.load.t.x js&&google.report&&google.report(google.timers.load,google.kCSI)}if(window.addEv entListener)window.addEventListener("load", l,false);else if(window.attachEvent)window.attachEvent("onload",l);google.timers .load.t.prt=(f=(new Date).getTime()); })(); </script>* Connection #0 to host 144.72.225.21 left intact * Closing connection #0 olegk wrote: > > On Sun, 2012-01-22 at 12:34 -0800, luciano.musacchio wrote: >> Hi all, >> >> I don't seem to make the ClientProxyAuthentication [1] example work with >> BASIC authentication. I've tried HttpClient 4.1, 4.2-a, 4.2-a2. I've >> tested >> the proxy using curl and it works fine. Below is my log output. >> >> I appreciate any guidance you can give me, >> > >> 2012/01/22 15:12:14:689 VET [DEBUG] wire - << "HTTP/1.1 407 Proxy >> Authentication Required[\r][\n]" >> 2012/01/22 15:12:14:692 VET [DEBUG] wire - << "Proxy-Authenticate: >> NTLM[\r][\n]" > > The proxy you are trying to authenticate allows NTLM auth scheme only. > It has not been configured to support BASIC auth. You need to be using > special extended credentials (NTCredentials class) that include a NT > domain and host for the NTLM auth to have a chance to succeed. > > Oleg > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > -- View this message in context: http://old.nabble.com/Challenge-for-Basic-authentication-scheme-not-available-%28-%29-tp33184745p33185089.html Sent from the HttpClient-User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
