Bug #11348

FastCGI and ISAPI routing issues

Added by Roel Standaert about 1 month ago. Updated 2 days ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


When using ISAPI, when accessing the application deployed at /app.dll, with the default entry point:

  • /app.dll and /app.dll/ work, but /app.dll/suffix yields a 404
  • When generating a URL for a resource at /app.dll, then the resource will have /?... as its URL instead of /app.dll?...

We can make /app.dll/suffix work by calling Configuration::matchEntryPoint(...) with matchAfterSlash set to true (which seems logical to me for any backend that doesn't serve static files), however:

If we then deploy something at / and something at /suffix, then requesting /app.dll/suffix will still go with the / entry point instead of the /suffix entry point.

EDIT: While working on this, I came across many other issues with paths and entrypoint matching, and they're all a little hard to separate from each other. Here are some other issues:

  • web/Configuration.h was not properly testable, due to a missing #include Wt/WConfig.h and it not being able to deal with an empty configurationFile_
  • WebRequest::scriptName() and WebRequest::pathInfo() would return something else before and after entrypoint matching, or at least that's how they were used. Both wtfcgi and wtisapi actually had bugs due to them trying to cache the result.
  • We disallowed an empty entrypoint path ("" would be automatically turned into "/"), but this is actually possible to have an empty entrypoint path when using FastCGI or ISAPI, e.g. if the script name is /scriptname.dll, then a request for /scriptname.dll should correctly resolve to the empty entrypoint.
  • entrypoint matching for FastCGI and ISAPI would set matchAfterSlash to false, but since FastCGI and ISAPI don't have the "ugly internal paths" feature, this should be true

Updated by Roel Standaert 30 days ago

  • Subject changed from ISAPI routing regressions to FastCGI and ISAPI routing issues
  • Description updated (diff)

Updated by Roel Standaert 30 days ago

  • Assignee deleted (Roel Standaert)

Updated by Roel Standaert 30 days ago

  • Status changed from InProgress to Review

Updated by Roel Standaert 27 days ago

  • Description updated (diff)

Updated by Roel Standaert 11 days ago

  • Status changed from Review to Implemented @Emweb
  • Assignee set to Roel Standaert
  • % Done changed from 0 to 100

Updated by Roel Standaert 2 days ago

  • Status changed from Implemented @Emweb to Resolved

Also available in: Atom PDF