http icon indicating copy to clipboard operation
http copied to clipboard

add-resource(server, "/", resource) can fail

Open cgay opened this issue 11 years ago • 1 comments

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.

cgay avatar Sep 08 '14 04:09 cgay

test-http-get-no-path is good to reproduce this.

cgay avatar Sep 08 '14 04:09 cgay