I am working with the RL-lib webserver and looking at the POST and GET function. In the functions presented by the RL-Lib there is no parameter with the destination file for the post or get method.
I other words, I want to know what the value is of the action attribute in the HTML FORM tag. Normally this is the page wich is given back from the webserver, so this value is known by the webserver.
Is there a way to detect/read this?
There is no documented way to read this parameter.
You could very easily add a hidden input field and set its name and / or value fields to reflect the action URL.
For example:
<form action="users.cgi"....> <input type="hidden" name="actionURL" value="users" /> </form>
What is your reason for needing to know the action attribute when processing the POSTed data?
If how you process the POST data depends on which page it was submitted from, you could implement a unique page ID for each page:
<form action="users.cgi"....> <input type="hidden" name="PID" value="123" /> </form>
If the form action attribute is being changed dynamically using JavaScript then you could use JS to change the values of the hidden input fields also.
We already use the solution you mention. It is indead an easy way for solving the problem.