node-mapserv
node-mapserv copied to clipboard
Fix cgi environment url parsing
We had an issue when trying to use SLD with MapServer via node-mapserv. The SLD_BODY parameter value, which is an encoded SLD XML string, seems to be decoded before being sent to MapServer. A friend of mine, who is unfamiliar with Github, proposed the following fix, which solves the issue.
What do you think ?
@adube Thanks, that looks fine except I'd like to de-duplicate the decodeURIComponent(urlParts.pathname)
call - I'll add a note in the code. Also could you provide a minimal example of the previously failing SLD URL: I'll add a test that checks for this.
@homme Gotcha. I don't currently have a public data set that I could use to show the the issue, but I'll make sure to build one. I should be able to do that today.
Thanks a lot for the reply! The deployment on a Windows environment is still looking good so far. Terrific !
@adube - Thanks, the test would be great. Also I'm glad it's proving useful on Windows. I've made a few changes recently including improving the error reporting and triggering module cleanup on various signals so I hope these have integrated ok. What we need is Travis CI support for Windows :)
I began working with Travis CI a few weeks ago. Do you mean it currently doesn't support Windows or you haven't implemented node-mapserv travis configuration to support Windows in its tests ?
I mean unfortunately it doesn't currently support Windows: travis-ci/travis-ci#216