I understand that data is part of the body in the post operation.
Let me explain again.
My server allows users to submit data only over SSL.
Earlier, in order to get the page, the users entered the
https URL of the page :
https://abc.com/file.html
User enters the data and clicks submit.
(lets forget about the parameter=foo for now)
In the form of the html page, I had
<form name=whatever method=post action="">
Since the action is empty, the POST of the data is done on the same url as the page URL which is
https://abc.com/file.html
So data is sent over SSL.
Now I want to serve the page in clear and only make the POST operation happen over SSL. To get the page, Users enter the URL :
http://abc.com/file.html
Users enter data and Submit.
I COULD have this in the form
<form name=whatever method=post action="https://abc.com/file.html">
SSL connection will be established when the user hits Submit and POST will happen
over SSL.
My problem is that the URL of the page can change, so I dont want to make it
explicit in the action attribute else I will have to change it continuously. However, I still want the users to be able to GET the page using HTTP and the POST should happen over HTTPS.
So I want to keep the form tag as below, in the html file but want the POST to happen over SSL.
<form name=whatever method=post action="">
Is there some kind of html header that can specify the default protocol to be
used for the method (i.e use https and not http). I know the action can be dynamically set using javascript, but I want to find out first if there is a purely html solution or not.
Thanks