php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #69145 HTTP_URL_STRIP_SCHEME and HTTP_URL_STRIP_HOST for build_url
Submitted: 2015-02-28 13:04 UTC Modified: 2015-06-16 07:04 UTC
From: olafvdspek at gmail dot com Assigned: mike (profile)
Status: Wont fix Package: pecl_http (PECL)
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-02-28 13:04 UTC] olafvdspek at gmail dot com
Description:
------------
HTTP_URL_STRIP_SCHEME and HTTP_URL_STRIP_HOST don't exist but would be nice to have.

HTTP_URL_STRIP_SCHEME is useful to ensure local links stay at the secure or non-secure site.
HTTP_URL_STRIP_HOST is useful when a site has multiple names and one wants (user-generated) links to stay at the same name.

Test script:
---------------
<?php
$s = 'http://example.com/php';
$s2 = http_build_url($s, array(), HTTP_URL_STRIP_SCHEME);
echo $s . "<br>\n";

Expected result:
----------------
//example.com/php


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-16 07:00 UTC] mike@php.net
-Assigned To: +Assigned To: mike
 [2015-06-16 07:00 UTC] mike@php.net
Sorry for the late notice.
 [2015-06-16 07:04 UTC] mike@php.net
-Status: Assigned +Status: Wont fix
 [2015-06-16 07:04 UTC] mike@php.net
Oh, well -- just noticed this is about pecl_http-v1 which is EOL.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 23:01:28 2019 UTC