Bug Report #4306

URL::base() fails to account for HTTPS under certain situations

Added by Shaun S 7 months ago. Updated 4 months ago.

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

duplicates Kohana v3.x - Bug Report #4135: Request protocol not correctly being set to https v3.2.1 Closed 07/26/2011 07/26/2011

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 Woody Gilk 4 months ago

  • Status changed from New to Closed
  • Resolution set to duplicate

Also available in: Atom PDF