Make WordPress Core


Ignore:
Timestamp:
04/08/2019 05:31:35 AM (8 years ago)
Author:
pento
Message:

HTTP: Add support for the host-only flag to Wp_Http_Cookie.

Props soulseekah.
Fixes #43231.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-http-requests-response.php

    r42343 r45135  
    165165                        $cookies[] = new WP_Http_Cookie(
    166166                                array(
    167                                         'name'    => $cookie->name,
    168                                         'value'   => urldecode( $cookie->value ),
    169                                         'expires' => isset( $cookie->attributes['expires'] ) ? $cookie->attributes['expires'] : null,
    170                                         'path'    => isset( $cookie->attributes['path'] ) ? $cookie->attributes['path'] : null,
    171                                         'domain'  => isset( $cookie->attributes['domain'] ) ? $cookie->attributes['domain'] : null,
     167                                        'name'      => $cookie->name,
     168                                        'value'     => urldecode( $cookie->value ),
     169                                        'expires'   => isset( $cookie->attributes['expires'] ) ? $cookie->attributes['expires'] : null,
     170                                        'path'      => isset( $cookie->attributes['path'] ) ? $cookie->attributes['path'] : null,
     171                                        'domain'    => isset( $cookie->attributes['domain'] ) ? $cookie->attributes['domain'] : null,
     172                                        'host_only' => isset( $cookie->flags['host-only'] ) ? $cookie->flags['host-only'] : null,
    172173                                )
    173174                        );
Note: See TracChangeset for help on using the changeset viewer.