Skip to content

remove usages of deprecated HttpRequest #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading