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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
38 - 6 = ?
Subscribe to this entry?

 
 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 13:01:26 2024 UTC