Commits


Soumendra Ganguly authored and Andy Green committed beacbbb38c5
minimal-examples: http-server-dyn: Check if the first part of received url is our mountpoint In the case of the http-server-dyn example, there is only one protocol. The mounts will override the area of the url space they are set up for, and the "gaps" will fall back to the default protocol, which in turn defaults to protocol[0] at the moment. So you always get the dyn protocol action on unknown parts of the URL space. This solves that behaviour by adding a new protocols[0] that calls straight through to the default protocol handler lws_callback_http_dummy(), and moves the dyn handler to be protocols[1]. In addition it shows how to check the url path in the dyn handler for cases where user code doesn't want to add the second protocol.