METHOD_OVERRIDE_HEADER = 'X-HTTP-Method-Override'

class MethodOverrideMiddleware(object):
    def process_request(self, request):
        if request.method != 'POST':
            return
        if METHOD_OVERRIDE_HEADER not in request.META:
            return
        request.method = request.META[METHOD_OVERRIDE_HEADER]


METHOD_OVERRIDE_HEADER = 'HTTP_X_HTTP_METHOD_OVERRIDE'

class MethodOverrideMiddleware(object):
    def process_request(self, request):
        if request.method != 'POST':
            return
        if METHOD_OVERRIDE_HEADER not in request.META:
            return
        print(request.META)
        request.method = request.META[METHOD_OVERRIDE_HEADER]
        print(request.META)

Revert Changes To Middleware To Prevent Build Hangup
[AC-4959] Revert Changes To Middleware To Prevent Build Hangup

- METHOD_OVERRIDE_HEADER = 'X-HTTP-Method-Override'
+ 
+ METHOD_OVERRIDE_HEADER = 'HTTP_X_HTTP_METHOD_OVERRIDE'
  
  class MethodOverrideMiddleware(object):
      def process_request(self, request):
          if request.method != 'POST':
              return
          if METHOD_OVERRIDE_HEADER not in request.META:
              return
+         print(request.META)
          request.method = request.META[METHOD_OVERRIDE_HEADER]
+         print(request.META)
  
Revert Changes To Middleware To Prevent Build Hangup
## Code Before:
METHOD_OVERRIDE_HEADER = 'X-HTTP-Method-Override'

class MethodOverrideMiddleware(object):
    def process_request(self, request):
        if request.method != 'POST':
            return
        if METHOD_OVERRIDE_HEADER not in request.META:
            return
        request.method = request.META[METHOD_OVERRIDE_HEADER]

## Instruction:
Revert Changes To Middleware To Prevent Build Hangup
## Code After:

METHOD_OVERRIDE_HEADER = 'HTTP_X_HTTP_METHOD_OVERRIDE'

class MethodOverrideMiddleware(object):
    def process_request(self, request):
        if request.method != 'POST':
            return
        if METHOD_OVERRIDE_HEADER not in request.META:
            return
        print(request.META)
        request.method = request.META[METHOD_OVERRIDE_HEADER]
        print(request.META)
