mikedeboer / jsDAV

jsDAV allows you to easily add WebDAV support to a NodeJS application. jsDAV is meant to cover the entire standard, and attempts to allow integration using an easy to understand API.
http://www.mikedeboer.nl
MIT License
681 stars 159 forks source link

baseUri isn't honored by server #125

Open shesmer opened 9 years ago

shesmer commented 9 years ago

I am trying to create a WebDAV based server that doesn't listen on the root and therefore I need a baseUri when setting up the server. In doing so I noticed that the baseUri gets overwritten afterwards through this line in server.js this.setBaseUri(this.guessBaseUri()); This will always set the baseUri to /

I was able to fix this by adding this line if (!options.baseUri) this.setBaseUri(this.guessBaseUri());

This causes the baseUri guessing only to happen when there wan't an explicit one set.

This of course is just a suggestion. :)

Can this please be fixed ?

shesmer commented 9 years ago

If it is easier I can also generate a pull request