node-mapserv icon indicating copy to clipboard operation
node-mapserv copied to clipboard

Fix cgi environment url parsing

Open adube opened this issue 11 years ago • 5 comments

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 avatar Jul 05 '13 13:07 adube

@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 avatar Jul 05 '13 14:07 homme

@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 avatar Jul 05 '13 14:07 adube

@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 :)

homme avatar Jul 05 '13 14:07 homme

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 ?

adube avatar Jul 05 '13 14:07 adube

I mean unfortunately it doesn't currently support Windows: travis-ci/travis-ci#216

homme avatar Jul 05 '13 15:07 homme