Ticket #17557: wp-app-fastcgi-status-headers.patch
| File wp-app-fastcgi-status-headers.patch, 1.1 KB (added by , 15 years ago) |
|---|
-
wp-app.php
1242 1242 */ 1243 1243 function length_required() { 1244 1244 log_app('Status','411: Length Required'); 1245 header("HTTP/1.1 411 Length Required");1246 1245 header('Content-Type: text/plain'); 1247 1246 status_header('411'); 1248 1247 exit; … … 1255 1254 */ 1256 1255 function invalid_media() { 1257 1256 log_app('Status','415: Unsupported Media Type'); 1258 header("HTTP/1.1 415 Unsupported Media Type");1259 1257 header('Content-Type: text/plain'); 1258 status_header('415'); 1260 1259 exit; 1261 1260 } 1262 1261 … … 1319 1318 </html> 1320 1319 1321 1320 EOD; 1322 header('HTTP/1.1 302 Moved');1323 1321 header('Content-Type: text/html'); 1324 header('Location: ' .$url);1322 wp_redirect($url); 1325 1323 echo $content; 1326 1324 exit; 1327 1325 … … 1377 1375 log_app('Status','401: Auth Required'); 1378 1376 nocache_headers(); 1379 1377 header('WWW-Authenticate: Basic realm="WordPress Atom Protocol"'); 1380 header("HTTP/1.1 401 $msg"); 1381 header('Status: 401 ' . $msg); 1378 status_header('401'); 1382 1379 header('Content-Type: text/html'); 1383 1380 $content = <<<EOD 1384 1381 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">