Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
catch-all content-handler
#5
(08-07-2021, 08:00 AM)JuergenS Wrote: I am currently already using IW15.2.34.
To register, I simply set TIWServerController :: URLBase without a slash.
The problem also occurs without my catch-all content handler, in which case the Intraweb error message dialog is displayed.
If a URL is inserted into the address bar of a browser without a slash at the end, the slash is usually automatically appended, but not always.

So, I'm assuming that you are registering as

  THandlers->Add("", s, SomeHandler);  // where s == TIWServerController::URLBase (minus the end URL delimiter)

  THandlers->Add("", "*", TheCatchAllHandler);

Is that correct?

Regarding 

>> The problem also occurs without my catch-all content handler, in which case the Intraweb error message dialog is displayed

Are you referring to the standard error page with error code 404 (Not found)?

If my assumption is correct, looks that you are registering 2 conflicting handlers (i.e. both are pointing to the root of your web site.

I would try to register the first content handler to point to some specific *path* (please notice that the path is the first parameter and requires both URL delimiters):

  THandlers->Add(s, "", SomeHandler);  // where s == TIWServerController::URLBase (including start/end URL delimiters)

In this case I don't see why you would need a catch all content handler (once you have a URLBase)
Reply


Messages In This Thread
catch-all content-handler - by JuergenS - 08-06-2021, 10:05 AM
RE: catch-all content-handler - by JuergenS - 08-07-2021, 08:00 AM
RE: catch-all content-handler - by Alexandre Machado - 08-07-2021, 08:18 AM
RE: catch-all content-handler - by JuergenS - 08-08-2021, 08:14 AM
RE: catch-all content-handler - by JuergenS - 08-18-2021, 07:29 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)