http
http copied to clipboard
add-resource(server, "/", resource) can fail
The http-client-test-suite registers some test resources like this:
define function register-test-resources (server :: <http-server>)
add-resource(server, "/x", make(<x-resource>));
add-resource(server, "/echo", make(<echo-resource>));
add-resource(server, "/", make(<echo-resource>));
Trying to access / fails for some reason. If instead the resources are registered in this order:
add-resource(server, "/", make(<echo-resource>));
add-resource(server, "/x", make(<x-resource>));
add-resource(server, "/echo", make(<echo-resource>));
it works fine.
Could be related to <placeholder-resource>s.
test-http-get-no-path is good to reproduce this.