Skip to content

Commit

Permalink
Removed remaining HEAD-handling code.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock committed Aug 15, 2024
1 parent 8524e04 commit 9996bb9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
10 changes: 1 addition & 9 deletions opensearchpy/_async/http_aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,6 @@ async def perform_request(
else:
query_string = ""

is_head = False
if method == "HEAD":
is_head = True

# Top-tier tip-toeing happening here. Basically
# because Pip's old resolver is bad and wipes out
# strict pins in favor of non-strict pins of extras
Expand Down Expand Up @@ -297,11 +293,7 @@ async def perform_request(
timeout=timeout,
fingerprint=self.ssl_assert_fingerprint,
) as response:
if is_head:
await response.release()
raw_data = "" # HEAD method has no response body
else:
raw_data = await response.text()
raw_data = await response.text()
duration = self.loop.time() - start

# We want to reraise a cancellation or recursion error.
Expand Down
10 changes: 1 addition & 9 deletions opensearchpy/connection/http_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,6 @@ async def perform_request(
else:
query_string = ""

is_head = False
if method == "HEAD":
is_head = True

# Top-tier tip-toeing happening here. Basically
# because Pip's old resolver is bad and wipes out
# strict pins in favor of non-strict pins of extras
Expand Down Expand Up @@ -217,11 +213,7 @@ async def perform_request(
timeout=timeout,
fingerprint=self.ssl_assert_fingerprint,
) as response:
if is_head:
await response.release()
raw_data = "" # HEAD method has no response body
else:
raw_data = await response.text()
raw_data = await response.text()
duration = self.loop.time() - start

# We want to reraise a cancellation or recursion error.
Expand Down

0 comments on commit 9996bb9

Please sign in to comment.