Ticket #672 (defect)
Opened 10 months ago
Last modified 8 months ago
Add setSecureConnection in THttpResponse
Status: closed (fixed)
| Reported by: | zen | Assigned to: | xue |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1.1 |
| Component: | Prado Framework v3 | Version: | 3.1 |
| Severity: | feature | Keywords: | SSL, HTTPS, Secure |
| Cc: |
I would like to request a new method for the THttpResponse module. To allow simple redirecting of the same page/service etc but over a secure connection. I have looked through the docs and I didnt see anything like this anywhere but I may have missed it.
I just think it would be a nice handy addition so that users could do something along the lines of...
if(!$this->getRequest()->getIsSecureConnection()) {
$this->getResponse()->setSecureConnection(true); }
Which would then obviously reload the page but adding the https scheme to the URL. I suppose there could be other ways of doing this such as in constructUrl etc.
Lewis
Change History
07/23/2007 04:51:38 PM: Modified by xue
- version changed from 3.0 to 3.1.
- milestone set to 3.1.1.
08/04/2007 11:20:31 AM: Modified by carl
- status changed from new to closed.
- resolution set to fixed.
09/14/2007 09:35:05 AM: Modified by zen
Fantastic!

Fixed. I decided not to incorporate the change into getIsSecureConnection because it is used to check which protocol you are using right now. If you need to create a link to a secure section of your Prado application, i created a new property called ForceSecureConnection?.
With this property you are able to create normal prado urls, with the ability to force either http or https on the url - that is, the opposite of the protocol the current request is on.
You may use this property in application.xml:
or you may use it directly in your code: