#1 2020-05-07 15:56:24

talexone
Member
Registered: 2013-08-21
Posts: 21

Redirecting to default

Hi,

In 30-MVCServer  the RootRedirectToURI redirects from '/' path to '/blog/default', but what about '/blog/'? I got Error 400.

20200507 15501404  +    mORMotSQLite3.TSQLRestServerDB(025818b0).URI GET blog/ in=0 B
20200507 15501404 debug 	mORMotSQLite3.TSQLRestServerDB(025818b0) TSQLRestRoutingREST.Error: {  "errorCode":400,  "errorText":"Bad Request"  }
20200507 15501404 srvr  	mORMotSQLite3.TSQLRestServerDB(025818b0)   GET blog/ Read=400 out=49 B in 59us

Another issue with a multiple controllers:

aBlog.Start(aServer);
aBlog2.Start(aServer);

In case of calling "/blog/blog2/default" got the default page from second controller, but in case of calling "/blog/blog2/" the request redirected to the faulty path "blog/blog2/blog/blog2//default"

20200507 15171034  +    mORMotSQLite3.TSQLRestServerDB(026618b0).URI GET blog/blog2/ in=0 B
20200507 15171034 srvr  	mORMotSQLite3.TSQLRestServerDB(026618b0)   GET blog/blog2 Method=307 out=0 B in 34us
20200507 15171034  -    00.000.044
20200507 15171558  +    mORMotSQLite3.TSQLRestServerDB(026618b0).URI GET blog/blog2/blog/blog2//default in=0 B

It's a bug or some configuration issue?

Regards,
AT

Offline

Board footer

Powered by FluxBB