#2067 Cyclical redirect while reading an url

Yuri Strot Sun 9 Dec 2012

I'm trying to use web pod to read following url:

uri := `https://autoconfig-live.mozillamessaging.com/autoconfig/v1.1/gmail.com`
echo(WebClient(uri).getStr)

But it fails:

sys::Err: Cyclical redirect: https://autoconfig-live.mozillamessaging.com/autoconfig/v1.1/gmail.com
  web::WebClient.checkFollowRedirect (WebClient.fan:422)
  web::WebClient.readRes (WebClient.fan:390)
  web::WebClient.getIn (WebClient.fan:238)
  web::WebClient.getStr (WebClient.fan:211)
  fanPlay::GetUrl.main (GetUrl.fan:11)
  java.lang.reflect.Method.invoke (Method.java:597)
  fan.sys.Method.invoke (Method.java:559)
  fan.sys.Method$MethodFunc.callOn (Method.java:230)
  fan.sys.Method.callOn (Method.java:139)
  fanx.tools.Fan.callMain (Fan.java:175)
  fanx.tools.Fan.executeType (Fan.java:140)
  fanx.tools.Fan.execute (Fan.java:41)
  fanx.tools.Fan.run (Fan.java:298)
  fanx.tools.Fan.main (Fan.java:336)

I can read this url without any problem in Java through URL.getContent or apache http.

alex_panchenko Sun 9 Dec 2012

https is not supported, however the scheme is checked only in uri setter.

alex_panchenko Sun 9 Dec 2012

and that check was added a month ago.

Yuri Strot Sun 9 Dec 2012

Right, just tried with the latest version:

fansh> using web
Add using: using web
fansh> echo(WebClient(`https://autoconfig-live.mozillamessaging.com/autoconfig/v1.1/gmail.com`).getStr)
sys::ArgErr: Request URI is not http: `https://autoconfig-live.mozillamessaging.com/autoconfig/v1.1/gmail.com`
  web::WebClient.reqUri (WebClient.fan:55)
  web::WebClient.make$ (WebClient.fan:40)
  web::WebClient.make (WebClient.fan:38)

Does https support on the roadmap?

brian Sun 9 Dec 2012

Does https support on the roadmap?

Yes, I would like to add at some point. I added some nodoc SSL hooks into TcpSocket for email SSL, but haven't done anything with web yet

Login or Signup to reply.