Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2014-05

FCGI TRequest URI

6 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dimitrios Chr. Ioannidis

Hi,

i'm trying to find out why the TRequest.URI property always return empty string in my setup. I have configured the web server apache like this

<Directory "/path/cgi/dir">
SetHandler fcgid-script
Order allow,deny
Allow from all
</Directory>

ScriptAlias /test /path/cgi/dir/fpc-fcgi-app.fcgi

and when i'm trying to get the uri with something like ARequest.URI it's always empty. The BaseURL, Host etc are ok.

Any hints ?

I'm using fpc 2.6.5 ( latest fixes branch ) and apache from debian wheezy ( 2.2.2 i think ).

regards,

Dimitrios Chr. Ioannidis

Reply by email

Michael Van Canneyt
to Dimitrios Chr. Ioannidis
Dimitrios Chr. Ioannidis wrote 17 lines
Hi, i'm trying to find out why the TRequest.URI property always return empty string in my setup. I have configured the web server apache like this <Directory "/path/cgi/dir"> SetHandler fcgid-script Order allow,deny Allow from all </Directory> ScriptAlias /test /path/cgi/dir/fpc-fcgi-app.fcgi and when i'm trying to get the uri with something like ARequest.URI it's always empty. The BaseURL, Host etc are ok. Any hints ?

Nope. Seems like something that needs to be debugged :(

Michael.

Reply by email

Dimitrios Chr. Ioannidis
to Michael Van Canneyt

Hi,

Στις 30/5/2014 12:57 μμ, ο/η Michael Van Canneyt έγραψε:

On Fri, 30 May 2014, Dimitrios Chr. Ioannidis wrote:

<snip>

Show quoted text 6 lines
> and when i'm trying to get the uri with something like ARequest.URI > it's always empty. The BaseURL, Host etc are ok. > > Any hints ? Nope. Seems like something that needs to be debugged :(

your answer implies that the apache configuration is correct so there must be a problem in the cgi params assignement code.

I'll take a look cause i want to use your wstmodule for web service toolkit, and you use the ARequest.URI as a parameter to construct the wsdl.

regards,

Dimitrios Chr. Ioannidis

Reply by email

Michael Van Canneyt
to Dimitrios Chr. Ioannidis
Dimitrios Chr. Ioannidis wrote 19 lines
Hi, Στις 30/5/2014 12:57 μμ, ο/η Michael Van Canneyt έγραψε: > > > On Fri, 30 May 2014, Dimitrios Chr. Ioannidis wrote: <snip> >> and when i'm trying to get the uri with something like ARequest.URI it's >> always empty. The BaseURL, Host etc are ok. >> >> Any hints ? > > Nope. Seems like something that needs to be debugged :( your answer implies that the apache configuration is correct so there must be a problem in the cgi params assignement code. I'll take a look cause i want to use your wstmodule for web service toolkit, and you use the ARequest.URI as a parameter to construct the wsdl.

Normally, it should be read from the REQUEST_URI environment variable.

Michael.

Reply by email

Dimitrios Chr. Ioannidis
to Michael Van Canneyt

Hi,

Στις 30/5/2014 1:09 μμ, ο/η Michael Van Canneyt έγραψε: <snip>

Normally, it should be read from the REQUEST_URI environment variable.

AFAIU, the URI property of the TRequest in the HTTPDefs unit, get's it's value from the command value when the fcgi app is started from web server .

My problem is that, i'm using my fcgi app as an external cgi server, and in this case the URI property is empty string. Investigating the fcgi protocol i see the REQUEST_URI param and i can confirm that it exists in the FCGIParams list.

Do i miss something ?

regards,

Dimitrios Chr. Ioannidis

Reply by email

Michael Van Canneyt
to Dimitrios Chr. Ioannidis
Dimitrios Chr. Ioannidis wrote 15 lines
Hi, Στις 30/5/2014 1:09 μμ, ο/η Michael Van Canneyt έγραψε: <snip> > Normally, it should be read from the REQUEST_URI environment variable. AFAIU, the URI property of the TRequest in the HTTPDefs unit, get's it's value from the command value when the fcgi app is started from web server . My problem is that, i'm using my fcgi app as an external cgi server, and in this case the URI property is empty string. Investigating the fcgi protocol i see the REQUEST_URI param and i can confirm that it exists in the FCGIParams list. Do i miss something ?

No, it is a bug then. Please post a bug report.

Michael.

Reply by email