Bug Report #4306
URL::base() fails to account for HTTPS under certain situations
| Status: | Closed | Start date: | 10/11/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | Core | |||
| Target version: | - | |||
| Resolution: | duplicate | Points: | 1 |
Description
Assuming the website is under HTTPS,
Scenario 1:
Calling URL::base(NULL) causes it to parse $base_url for the protocol.
Scenario 2:
Calling URL::base(TRUE)
In this scenario, URL::base(TRUE) first pulls the protocol from Request::$initial->protocol(). That method will never return "https", since it pulls its value from $_SERVER['SERVER_PROTOCOL'].
So, even if the initial request was under HTTPS, URL::base(TRUE) would return a non-https URL.
Related issues
History
Updated by Nano Documet 7 months ago
I have the same issue. Any comments from the core developers?
TIA,
Nano.
Updated by Alejandro García Iglesias 4 months ago
Same here, it returns a non-HTTPS URL with the addition of :443 port...
http://stackoverflow.com/questions/8792553/kohana-3-urlbase-method-returns-bad-url-on-https
Updated by Alejandro García Iglesias 4 months ago
Ohh, this is duplicated: http://dev.kohanaframework.org/issues/4135
Updated by Woody Gilk 4 months ago
- Status changed from New to Closed
- Resolution set to duplicate