Changeset 2674872
- Timestamp:
- 02/08/2022 10:04:01 AM (3 years ago)
- Location:
- surge/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
surge/trunk/include/cache.php
r2656415 r2674872 31 31 foreach ( headers_list() as $header ) { 32 32 list( $name, $value ) = array_map( 'trim', explode( ':', $header, 2 ) ); 33 $headers[ $name ] = $value; 33 34 // Do not store or vary on these headers. 35 if ( in_array( strtolower( $name ), ['x-cache', 'x-powered-by'] ) ) { 36 continue; 37 } 38 39 $headers[ $name ][] = $value; 34 40 35 41 if ( strtolower( $name ) == 'set-cookie' ) { -
surge/trunk/include/common.php
r2656415 r2674872 80 80 $path = $parsed['path']; 81 81 $query = $parsed['query'] ?? ''; 82 parse_str( $query, $query_vars ); 82 $query_vars = []; 83 84 // Simplified parse_str without urldecoding 85 foreach ( explode( '&', $query ) as $pair ) { 86 $parts = explode( '=', $pair, 2 ); 87 $key = $parts[0]; 88 $value = $parts[1] ?? ''; 89 90 if ( ! array_key_exists( $key, $query_vars ) ) { 91 $query_vars[ $key ] = $value; 92 } else { 93 if ( ! is_array( $query_vars[ $key ] ) ) { 94 $query_vars[ $key ] = [ $query_vars[ $key ] ]; 95 } 96 $query_vars[ $key ][] = $value; 97 } 98 } 83 99 84 100 // Ignore some query vars. -
surge/trunk/include/invalidate.php
r2656448 r2674872 115 115 'update_option_page_on_front', 116 116 'update_option_page_for_posts', 117 117 118 'update_option_woocommerce_permalinks', 118 119 'automatic_updates_complete', -
surge/trunk/include/serve.php
r2640447 r2674872 74 74 http_response_code( $meta['code'] ); 75 75 76 foreach ( $meta['headers'] as $name => $value ) { 77 header( "{$name}: {$value}" ); 76 foreach ( $meta['headers'] as $name => $values ) { 77 foreach( (array) $values as $value ) { 78 header( "{$name}: {$value}", false ); 79 } 78 80 } 79 81 -
surge/trunk/readme.txt
r2656415 r2674872 6 6 Tested up to: 5.9 7 7 Requires PHP: 7.3 8 Stable tag: 1.0. 28 Stable tag: 1.0. 9 9 License: GPLv3 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.en.html … … 63 63 == Changelog == 64 64 65 66 67 68 69 70 65 71 = 1.0.2 = 66 72 * Fix PHP notice in invalidation -
surge/trunk/surge.php
r2656415 r2674872 8 8 * Text Domain: surge 9 9 * Domain Path: /languages 10 * Version: 1.0. 210 * Version: 1.0. 11 11 * 12 12 * @package Surge
Note: See TracChangeset
for help on using the changeset viewer.