[wp-trac] [WordPress Trac] #49385: wp_remote_get() cannot retrieve webcal URIs

WordPress Trac noreply at wordpress.org
Fri Feb 7 18:33:22 UTC 2020

#49385: wp_remote_get() cannot retrieve webcal URIs
 Reporter:  johnjamesjacoby  |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  HTTP API         |    Version:
 Severity:  normal           |   Keywords:  needs-patch needs-unit-tests
  Focuses:                   |
 In #31666, `webcal` was added to the list of allowed protocols.
 Unfortunately this does not bubble up into the HTTP API for remote
 requests, and `wp_remote_get()` on a `webcal://` URI will fail with:

   public 'errors' =>
     array (size=1)
       'http_request_failed' =>
         array (size=1)
           0 => string 'A valid URL was not provided.' (length=29)
   public 'error_data' =>
     array (size=0)

 Here is my proof-of-concept to show off the failure:
 add_action( 'plugins_loaded', function() {

         // Public iCloud calendar I created
         $uri = 'webcal://p41-caldav.icloud.com/published/2

         // Regular remote get call
         $get = wp_remote_get( $uri );

         // Dump results
         var_dump( $get ); die;
 } );

Ticket URL: <https://core.trac.wordpress.org/ticket/49385>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list