Article

From:
To:
All
Subject:
WebBroker Action PathInfo requires the script name ?
Newsgroup:
embarcadero.public.delphi.internet.isapi-webbroker
URL:
Shortcut to this article
Printer Friendly
 

WebBroker Action PathInfo requires the script name ?

I'm writing a simple webbroker dll to be hosted under IIS (under WS2008/64). I'm running D2010 Enterprise on Win XP.

I have added several actions plus a default action which returns some basic info about the request:
[code]
  Response.Content := 'path: ' + Request.PathInfo;
  Response.Content := Response.Content + '<br/> url: ' + Request.URL;
  Response.Content := Response.Content + '<br/> query: ' + Request.Query;
Response.Content := Response.Content + '<br/> pathtranslated: ' + Request.PathTranslated;
  Response.Content := Response.Content + '<br/> script: ' + Request.ScriptName;
[/code]
This shows the following output for a URL of "http://myservername/hl7engine.dll/HelloWorld":
path: /hl7engine.dll/HelloWorld
url: /hl7engine.dll
query:
pathtranslated: C:\inetpub\wwwroot\hl7engine.dll\HelloWorld
script: /hl7engine.dll

My question: I would expect the URL to show the full URL and not just the scriptname. I also expect the PathInfo to show just the path after the scriptname.

Marco Cantu's excellent Mastering Delphi book shows this as an example:
http://www.example.com/scripts/cgitest.exe/path1?param1=date
and says the pathname is the portion of the ISAPI application's URL, which comes after the program name (and before the parameters) such as "path1" in the preceeding URL.

The only way I can get paths to route correctly and call the correct Action is by including the scriptname as a prefix in the Action's PathInfo property. E.g. "/hl7engine.dll/HelloWorld" calls the HelloWorld Action, "/HelloWorld" calls the default Action.

Is this a new bug in D2010 or have I configured something incorrectly ?
FYI: Phrase searches are enclosed in either single or double quotes
 
 
 
24-Jul 11:00 utc Operating system upgrade in process, expect some down time.
Originally created by
[Tamarack]
Tue, 25 Jul 2017 02:31:46 UTC
Copyright © 2009-2017
HREF Tools Corp.