Remove redfish-post-to-old-updateservice

It is now Q2 2023, and this option has been deprecated.  Maintainers
have not had any reports of this behavior breaking people.

Tested: Code delete only.  Code compiles.

Change-Id: I9c1fe26e497806c6bc602fb019bafe0fc80d7619
Signed-off-by: Ed Tanous <edtanous@google.com>
diff --git a/meson.build b/meson.build
index 152a2fd..05e5e2e 100644
--- a/meson.build
+++ b/meson.build
@@ -83,7 +83,6 @@
   'redfish-new-powersubsystem-thermalsubsystem' : '-DBMCWEB_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM',
   'redfish-oem-manager-fan-data'                : '-DBMCWEB_ENABLE_REDFISH_OEM_MANAGER_FAN_DATA',
   'redfish-provisioning-feature'                : '-DBMCWEB_ENABLE_REDFISH_PROVISIONING_FEATURE',
-  'redfish-post-to-old-updateservice'           : '-DBMCWEB_ENABLE_REDFISH_UPDATESERVICE_OLD_POST_URL',
   'redfish'                                     : '-DBMCWEB_ENABLE_REDFISH',
   'rest'                                        : '-DBMCWEB_ENABLE_DBUS_REST',
   'session-auth'                                : '-DBMCWEB_ENABLE_SESSION_AUTHENTICATION',
diff --git a/meson_options.txt b/meson_options.txt
index 0bf2c35..8a440f9 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -218,16 +218,6 @@
 )
 
 option(
-    'redfish-post-to-old-updateservice',
-    type: 'feature',
-    value: 'disabled',
-    description: '''Allows POST to /redfish/v1/UpdateService, counter to
-                    the redfish specification.  Option provided to allow
-                    potential users to move away from using this endpoint.
-                    Option will be removed Q2 2023.'''
-)
-
-option(
     'redfish-oem-manager-fan-data',
     type: 'feature',
     value: 'enabled',
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 5f46d0a..7c8ce01 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -723,15 +723,6 @@
         asyncResp->res.jsonValue["Description"] = "Service for Software Update";
         asyncResp->res.jsonValue["Name"] = "Update Service";
 
-#ifdef BMCWEB_ENABLE_REDFISH_UPDATESERVICE_OLD_POST_URL
-        // See note about later on in this file about why this is neccesary
-        // This is "Wrong" per the standard, but is done temporarily to
-        // avoid noise in failing tests as people transition to having this
-        // option disabled
-        asyncResp->res.addHeader(boost::beast::http::field::allow,
-                                 "GET, PATCH, HEAD");
-#endif
-
         asyncResp->res.jsonValue["HttpPushUri"] =
             "/redfish/v1/UpdateService/update";
         asyncResp->res.jsonValue["MultipartHttpPushUri"] =
@@ -829,27 +820,6 @@
         }
         });
 
-// The "old" behavior of the update service URI causes redfish-service validator
-// failures when the Allow header is supported, given that in the spec,
-// UpdateService does not allow POST.  in openbmc, we unfortunately reused that
-// resource as our HttpPushUri as well.  A number of services, including the
-// openbmc tests, and documentation have hardcoded that erroneous API, instead
-// of relying on HttpPushUri as the spec requires.  This option will exist
-// temporarily to allow the old behavior until Q4 2022, at which time it will be
-// removed.
-#ifdef BMCWEB_ENABLE_REDFISH_UPDATESERVICE_OLD_POST_URL
-    BMCWEB_ROUTE(app, "/redfish/v1/UpdateService/")
-        .privileges(redfish::privileges::postUpdateService)
-        .methods(boost::beast::http::verb::post)(
-            [&app](const crow::Request& req,
-                   const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
-        asyncResp->res.addHeader(
-            boost::beast::http::field::warning,
-            "299 - \"POST to /redfish/v1/UpdateService is deprecated. Use "
-            "the value contained within HttpPushUri.\"");
-        handleUpdateServicePost(app, req, asyncResp);
-        });
-#endif
     BMCWEB_ROUTE(app, "/redfish/v1/UpdateService/update/")
         .privileges(redfish::privileges::postUpdateService)
         .methods(boost::beast::http::verb::post)(