views:

722

answers:

2

Hi, I'm working on an application that uses mod_plsql with Oracle 10G to generate web pages via PL/SQL stored procedures called directly from the web browser. I'm looking for a way to only accept parameters via POST requests, and not GET requests.

Ie, in PHP I would only want the value of $_POST['parameter_name'] and not $_GET['parameter_name']. I haven't been able to find a way to achieve this in Pl/SQL, since the parameters are specified in the procedure definition and without a request type.

Is there any way to achieve this with PL/SQL?

Thank you.

+1  A: 

In the Apache configuration, you can probably use the Limit directive to restrict the relevant URLs to POST requests.

Peter Hilton
+2  A: 

If you don't have access to the Apache config, you can probably put the following code at the top of your Oracle procedure:

if owa_util.get_cgi_env('REQUEST_METHOD') != 'POST' then
    raise_application_error(-20001,'Only POST request method is allowed.');
end if;
IK