In field_redirection_field_formatter_view(), the switch statement lacks the appropriate breaks meaning the response code will always be 307.
See:
switch ($display['type']) {
// All of these are handled the same way, just with a different HTTP
// response code. See http://en.wikipedia.org/wiki/URL_redirection for
// full details.
case 'redirect_300':
$response_code = 300;
case 'redirect_301':
$response_code = 301;
case 'redirect_302':
$response_code = 302;
case 'redirect_303':
$response_code = 303;
case 'redirect_304':
$response_code = 304;
case 'redirect_305':
$response_code = 305;
case 'redirect_307':
$response_code = 307;
$element = field_redirection_goto($instance, $items[0], $response_code);
break;
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | field_redirection-n1255164-2.patch | 478 bytes | damienmckenna |
| #1 | field_redirection-n1255164.patch | 1.76 KB | damienmckenna |
Comments
Comment #1
damienmckennaThat's a serious facepalm! Thanks for finding it!
Comment #2
damienmckennaI will eventually stop making #facepalms. Here's a follow-up patch to fix a syntax problem.
Comment #3
damienmckennaI've released 7.x-1.2 with the two patches added (yes, 7.x-1.1 was broken too). Thanks bfroehle!