Monday 13 March 2017

404 - File or directory not found error while downloading iso file from webdav

i was trying to download iso file from webdav share using http request, but it was getting error. code i was using as follows.

var request = require('request');

request.get('url(https webdav url path to file location)', {
    'auth': {
        'user': 'username',
        'pass': 'password',
    },
     headers: {
                'Content-type': "application/octet-stream"
            }

}, function (err, res, body) {
    console.log(err);

    console.log(body);
});

Above code was working properly for all types of files except for ISO file types it wasn't working. i was getting response as follows

<div id="header"><h1>Server Error</h1></div>
<div id="content">
 <div class="content-container"><fieldset>
  <h2>404 - File or directory not found.</h2>
  <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>
 </fieldset></div>
</div>

And i am pretty sure file was there and path was also correct. Any help please..



via Ram

No comments:

Post a Comment