Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-07

THttpServlet servlet mappings strange behaviour

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Leonardo Cecchi

Hi,

I'm coding a small http application using che THttpServer class from the FCL.
My application has only two servlet:

HttpServer.AddServlet(PrimoServlet, ´/primo´);
HttpServer.AddServlet(SecondoServlet, ´/secondo´);

It's all ok but I have some strange mappings between URI and servlets:

http://localhost:8080/blabla -> Runs the second servlet (SecondoServlet). Why?
http://localhost:8080 -> Runs the second servlet (SecondoServlet). Why?
http://localhost:8080/primo -> Runs the first servlet (OK) http://localhost:8080/secondo -> Runs the second servlet (OK)

So an URI who is not present in the servlet mappings is mapped to the last servlet instead of throwing an "Invalid URL". It's a bug or a well-known behaviour?
Thanks,

Leonardo Cecchi