network.request problem for dropbox direct link

Hi,

Recently I tried to download a file on dropbox using a direct link (ex: https://www.dropbox.com/s/80bnxlzo8ycsfh6/index.txt?dl=1)..)

But when I do

   http_url = "https://www.dropbox.com/s/80bnxlzo8ycsfh6/index.txt?dl=1"

    network.request( http_url, “GET”, networkLintener )

I was hoping to get the file index.txt, but I get the following:

Jan 12 15:35:50.435: <html>

 

  <head><title>Found</title></head>

 

  <body>

 

    <h1>Found</h1>

 

    <p>The resource was found at <a href="https://dl.dropboxusercontent.com/content_link/uXqA99RxuCxdZBceReYK5nJPpe5tgrJU9XqAZUj4VqRYM6qexW5UQ0LRoG7fOIrQ?dl=1">https://dl.dropboxusercontent.com/content_link/uXqA99RxuCxdZBceReYK5nJPpe5tgrJU9XqAZUj4VqRYM6qexW5UQ0LRoG7fOIrQ?dl=1</a>;

 

you should be redirected automatically.

 

 

 

<!--  --></p>

 

    <hr noshade>

 

    <div align=“right”>WSGI Server</div>

 

  </body>

 

</html>

 

How can I get the correct file ?

It’s strange that the Simulator is NG, but it’s ok on LG GPro2. 

You may  have to look for that, parse the URL out of the response and request that file.   I would expect them to do a 301 Redirect instead of spewing an intermediate HTML page at you.  Any way, iOS and Android (and even within Android versions) will handle redirects a little bit differently.

Rob

It’s strange that the Simulator is NG, but it’s ok on LG GPro2. 

You may  have to look for that, parse the URL out of the response and request that file.   I would expect them to do a 301 Redirect instead of spewing an intermediate HTML page at you.  Any way, iOS and Android (and even within Android versions) will handle redirects a little bit differently.

Rob