wictorwilen / gulp-spsync

Gulp plugin for synchronizing local files with a SharePoint library
MIT License
57 stars 17 forks source link

WWW-Authenticate is not returned in the header #17

Open kaffeskogen opened 6 years ago

kaffeskogen commented 6 years ago

Trying to run spsync, correctly configured, I get the following:

'debug-publish' errored after 947 ms
TypeError in plugin 'gulp-spsync'
Message:
    Cannot read property 'indexOf' of undefined

The reason is that when getting the realm from target url, WWW-Authenticate doesn't exist in the response headers.

Resolved it by changing var clientsvc = "/vti_bin/client.svc" to var clientsvc = "/_vti_bin/client.svc" in index.js (Adding an underscore).