Open matejuh opened 6 years ago
This test case fails although it should pass:
import org.junit.Assert; import ratpack.handling.Handler; import ratpack.handling.Handlers; import ratpack.test.embed.EmbeddedApp; public class Server { public static void main(String... args) throws Exception { EmbeddedApp.of(s -> s .handlers(c -> c.get(":a/:b", ctx -> { Handler h = Handlers.path(":a/:b", ctx1 -> { ctx.getResponse().status(204).send(); }); ctx.insert(h); }) )).test(httpClient -> Assert.assertEquals(204, httpClient.get("/1/2").getStatusCode())); } }
I think this is wrong because then pastBinding here is an empty string so it will never match.
Remove the .send() from the h Handler. it might thrown a double transmission error with that send
This test case fails although it should pass:
I think this is wrong because then pastBinding here is an empty string so it will never match.