Re: [fpc-pascal] fcl-web: retrieve URI given TFPWebModule and TFPWebAction instances

2015-05-02 Thread leledumbo
> But you'll have to be prepared that a module can be registered for different URLs, > so the return is a TStringArray (or Strings). No problem, nested for is not that slow ;) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/fcl-web-retrieve-URI-given-TFPWebM

Re: [fpc-pascal] fcl-web: retrieve URI given TFPWebModule and TFPWebAction instances

2015-05-02 Thread Michael Van Canneyt
On Sat, 2 May 2015, leledumbo wrote: It is on my todo list, yes. I'll be waiting. One more thing (which is actually why I ask my original question), how can I get registered module name given the module instance or module class? i.e. if I: RegisterHTTPModule('m',TModule); then Something(

Re: [fpc-pascal] fcl-web: retrieve URI given TFPWebModule and TFPWebAction instances

2015-05-02 Thread leledumbo
> It is on my todo list, yes. I'll be waiting. One more thing (which is actually why I ask my original question), how can I get registered module name given the module instance or module class? i.e. if I: RegisterHTTPModule('m',TModule); then Something(TModule); or Something(Module); shall re

Re: [fpc-pascal] fcl-web: retrieve URI given TFPWebModule and TFPWebAction instances

2015-05-02 Thread Michael Van Canneyt
On Sat, 2 May 2015, leledumbo wrote: I have corrected this, they share the same field now. Rev 30760. Thanks, Michael. It looks like you should start considering unit test for fcl-web. It is on my todo list, yes. I have recently created a TTestRequestApp custapp descendent which can be u

Re: [fpc-pascal] fcl-web: retrieve URI given TFPWebModule and TFPWebAction instances

2015-05-02 Thread leledumbo
> I have corrected this, they share the same field now. Rev 30760. Thanks, Michael. It looks like you should start considering unit test for fcl-web. > PS. You can use the dumprequest routine in webutils to create a relatively > complete dump in HTML of the HTTP environment. Noted. Btw, PathI

Re: [fpc-pascal] fcl-web: retrieve URI given TFPWebModule and TFPWebAction instances

2015-05-02 Thread Michael Van Canneyt
On Fri, 1 May 2015, ABorka wrote: I am not sure about the Embedded Webserver as I have never used it, but I remember vaguely about some kind of problem we have fixed regarding pathinfo with Apache 2.4 and the mod_proxi_fcgi a few years ago. There was a bug report, let me see if I can find i

Re: [fpc-pascal] fcl-web: retrieve URI given TFPWebModule and TFPWebAction instances

2015-05-01 Thread ABorka
I am not sure about the Embedded Webserver as I have never used it, but I remember vaguely about some kind of problem we have fixed regarding pathinfo with Apache 2.4 and the mod_proxi_fcgi a few years ago. There was a bug report, let me see if I can find it: ... http://bugs.freepascal.org/view

Re: [fpc-pascal] fcl-web: retrieve URI given TFPWebModule and TFPWebAction instances

2015-05-01 Thread leledumbo
> ARequest.URI ? > Forgot to mention that there is a global Request property which is the > same. > So Request.URI ... It's empty in CGI/FastCGI/Embedded Webserver. Did I just find another bug? This is the result of dumping [A]Request properties: [CGI, URL = http://localhost/test.fpw/m/hello

Re: [fpc-pascal] fcl-web: retrieve URI given TFPWebModule and TFPWebAction instances

2015-05-01 Thread ABorka
Forgot to mention that there is a global Request property which is the same. So Request.URI ... AB On 5/1/2015 08:59, ABorka wrote: ARequest.URI ? There are other properties that can be useful: ARequest.URL ARequest.Location ARequest.PathInfo ARequest.PathTranslated ARequest.ScriptName ARequ

Re: [fpc-pascal] fcl-web: retrieve URI given TFPWebModule and TFPWebAction instances

2015-05-01 Thread ABorka
ARequest.URI ? There are other properties that can be useful: ARequest.URL ARequest.Location ARequest.PathInfo ARequest.PathTranslated ARequest.ScriptName ARequest.Query On 5/1/2015 07:29, leledumbo wrote: Is there any easy way to retrieve URI given TFPWebModule and TFPWebAction instances? f

[fpc-pascal] fcl-web: retrieve URI given TFPWebModule and TFPWebAction instances

2015-05-01 Thread leledumbo
Is there any easy way to retrieve URI given TFPWebModule and TFPWebAction instances? for instance: ... RegisterHTTPModule('m',TAModule); ... from inside an action's request handler: procedure Tm.XXXRequest(Sender: TObject; ARequest: TRequest; AResponse: TResponse; var Handled: Boolean); begin