From 570ae9ca121a4289be12aa5d589a1e129f352c60 Mon Sep 17 00:00:00 2001 From: James Allsup Date: Thu, 10 Jul 2014 08:58:25 +0100 Subject: [PATCH] Fixed 404 headers. REF: #1620 --- changelog.md | 1 + upload/catalog/controller/account/download.php | 2 +- upload/catalog/controller/account/order.php | 2 +- upload/catalog/controller/account/return.php | 2 +- upload/catalog/controller/error/not_found.php | 2 +- upload/catalog/controller/information/information.php | 2 +- upload/catalog/controller/payment/pp_express.php | 2 +- upload/catalog/controller/product/category.php | 2 +- upload/catalog/controller/product/manufacturer.php | 2 +- upload/catalog/controller/product/product.php | 2 +- 10 files changed, 10 insertions(+), 9 deletions(-) diff --git a/changelog.md b/changelog.md index c6cbd5e3031..fa7be5dc7cd 100644 --- a/changelog.md +++ b/changelog.md @@ -7,6 +7,7 @@ * Fixed issue in Amazon Payments where tax lines where passed as products if cart had different tax rates. * Fixed the implementation of captchas. * Incorrect file type when uploading on Windows Machines REF: #1550 +* Corrected 404 response headers REF: #1620 #### Changes * Removed duplicate DELETE SQL query for product attributes REF: #1379 diff --git a/upload/catalog/controller/account/download.php b/upload/catalog/controller/account/download.php index 4959510d79b..4a1f7a3723e 100644 --- a/upload/catalog/controller/account/download.php +++ b/upload/catalog/controller/account/download.php @@ -127,7 +127,7 @@ public function index() { $this->data['continue'] = $this->url->link('account/account', '', 'SSL'); - $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . '/1.1 404 Not Found'); + $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . ' 404 Not Found'); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) { $this->template = $this->config->get('config_template') . '/template/error/not_found.tpl'; diff --git a/upload/catalog/controller/account/order.php b/upload/catalog/controller/account/order.php index f1c14730272..214a41562b7 100644 --- a/upload/catalog/controller/account/order.php +++ b/upload/catalog/controller/account/order.php @@ -421,7 +421,7 @@ public function info() { $this->data['continue'] = $this->url->link('account/order', '', 'SSL'); - $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . '/1.1 404 Not Found'); + $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . ' 404 Not Found'); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) { $this->template = $this->config->get('config_template') . '/template/error/not_found.tpl'; diff --git a/upload/catalog/controller/account/return.php b/upload/catalog/controller/account/return.php index 542f27efd2d..d9cbc087a5d 100644 --- a/upload/catalog/controller/account/return.php +++ b/upload/catalog/controller/account/return.php @@ -277,7 +277,7 @@ public function info() { $this->data['continue'] = $this->url->link('account/return', '', 'SSL'); - $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . '/1.1 404 Not Found'); + $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . ' 404 Not Found'); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) { $this->template = $this->config->get('config_template') . '/template/error/not_found.tpl'; diff --git a/upload/catalog/controller/error/not_found.php b/upload/catalog/controller/error/not_found.php index c6089872ddc..49281cc09ce 100644 --- a/upload/catalog/controller/error/not_found.php +++ b/upload/catalog/controller/error/not_found.php @@ -47,7 +47,7 @@ public function index() { $this->data['button_continue'] = $this->language->get('button_continue'); - $this->response->addheader($this->request->server['SERVER_PROTOCOL'] . '/1.1 404 not found'); + $this->response->addheader($this->request->server['SERVER_PROTOCOL'] . ' 404 not found'); $this->data['continue'] = $this->url->link('common/home'); diff --git a/upload/catalog/controller/information/information.php b/upload/catalog/controller/information/information.php index cd1b3c63f48..f1e32f04c82 100644 --- a/upload/catalog/controller/information/information.php +++ b/upload/catalog/controller/information/information.php @@ -71,7 +71,7 @@ public function index() { $this->data['continue'] = $this->url->link('common/home'); - $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . '/1.1 404 Not Found'); + $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . ' 404 Not Found'); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) { $this->template = $this->config->get('config_template') . '/template/error/not_found.tpl'; diff --git a/upload/catalog/controller/payment/pp_express.php b/upload/catalog/controller/payment/pp_express.php index 1cb2c019dbb..93839369012 100644 --- a/upload/catalog/controller/payment/pp_express.php +++ b/upload/catalog/controller/payment/pp_express.php @@ -1539,7 +1539,7 @@ public function checkoutReturn() { unset($this->session->data['success']); - $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . '/1.1 404 Not Found'); + $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . ' 404 Not Found'); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) { $this->template = $this->config->get('config_template') . '/template/error/not_found.tpl'; diff --git a/upload/catalog/controller/product/category.php b/upload/catalog/controller/product/category.php index 02d25155826..cac517afb7d 100644 --- a/upload/catalog/controller/product/category.php +++ b/upload/catalog/controller/product/category.php @@ -437,7 +437,7 @@ public function index() { $this->data['continue'] = $this->url->link('common/home'); - $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . '/1.1 404 Not Found'); + $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . ' 404 Not Found'); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) { $this->template = $this->config->get('config_template') . '/template/error/not_found.tpl'; diff --git a/upload/catalog/controller/product/manufacturer.php b/upload/catalog/controller/product/manufacturer.php index d9052a592b7..a5b00c42ce9 100644 --- a/upload/catalog/controller/product/manufacturer.php +++ b/upload/catalog/controller/product/manufacturer.php @@ -408,7 +408,7 @@ public function info() { $this->data['continue'] = $this->url->link('common/home'); - $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . '/1.1 404 Not Found'); + $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . ' 404 Not Found'); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) { $this->template = $this->config->get('config_template') . '/template/error/not_found.tpl'; diff --git a/upload/catalog/controller/product/product.php b/upload/catalog/controller/product/product.php index b6489decfef..3e5f1a71964 100644 --- a/upload/catalog/controller/product/product.php +++ b/upload/catalog/controller/product/product.php @@ -539,7 +539,7 @@ public function index() { $this->data['continue'] = $this->url->link('common/home'); - $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . '/1.1 404 Not Found'); + $this->response->addHeader($this->request->server['SERVER_PROTOCOL'] . ' 404 Not Found'); if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/error/not_found.tpl')) { $this->template = $this->config->get('config_template') . '/template/error/not_found.tpl';