Skip to content

Commit

Permalink
remove usages of deprecated HttpRequest (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrashed authored Jun 7, 2024
1 parent b6b129a commit ea3478e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions aws-replicator/aws_replicator/client/auth_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from botocore.model import OperationModel
from localstack import config
from localstack import config as localstack_config
from localstack.aws.api import HttpRequest
from localstack.aws.protocol.parser import create_parser
from localstack.aws.spec import load_service
from localstack.config import external_service_url
Expand Down Expand Up @@ -86,7 +85,7 @@ def proxy_request(self, request: Request, data: bytes) -> Response:
query_string,
)

request = HttpRequest(
request = Request(
body=data,
method=request.method,
headers=request.headers,
Expand Down Expand Up @@ -157,7 +156,7 @@ def register_in_instance(self):
raise

def _parse_aws_request(
self, request: HttpRequest, service_name: str, region_name: str, client
self, request: Request, service_name: str, region_name: str, client
) -> Tuple[OperationModel, AWSPreparedRequest, Dict]:
parser = create_parser(load_service(service_name))
operation_model, parsed_request = parser.parse(request)
Expand Down Expand Up @@ -246,7 +245,7 @@ def _adjust_request_dict(self, service_name: str, request_dict: Dict):
req_json["QueueOwnerAWSAccountId"] = account_id
request_dict["body"] = to_bytes(json.dumps(req_json))

def _fix_headers(self, request: HttpRequest, service_name: str):
def _fix_headers(self, request: Request, service_name: str):
if service_name == "s3":
# fix the Host header, to avoid bucket addressing issues
host = request.headers.get("Host") or ""
Expand Down

0 comments on commit ea3478e

Please sign in to comment.