mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Response Header Content-Length not available when call HEAD Method #400
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bangush on GitHub (Feb 7, 2022).
Originally assigned to: @StefH on GitHub.
Refer to the Previous Bug #136 and Bug #137. When call HEAD Method the Cotent-Length is not available.
@bangush commented on GitHub (Feb 7, 2022):
Hint: I randomly check multiple versions, and up-to WireMock.Net Ver 1.0.4.19 work with header contents and return the values as expected. but after that the process is broken.
@StefH commented on GitHub (Feb 7, 2022):
@bangush
According to the specs, Head does not have a body.
So also not a content-length.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD
@textbook commented on GitHub (May 30, 2023):
As is visible in the quote:
Per RFC9110, although:
So although a HEAD response is not required to have a
Content-Length, it certainly (and despite the lack of actual content) can if that length is known.@maoso commented on GitHub (Jun 6, 2023):
Hi @StefH,
Is this issue going to be fixed? A head response returns the content-length of the file but WireMock not.
@dianast31 commented on GitHub (Aug 13, 2024):
Hi @StefH,
Is this issue going to be fixed? I have the same problem as @maoso. Is there a workaround for this bug?
@StefH commented on GitHub (Aug 13, 2024):
I will have a look if it's possible to support content-lenght for head.
@StefH commented on GitHub (Aug 16, 2024):
https://github.com/WireMock-Net/WireMock.Net/pull/1158
@dianast31 commented on GitHub (Aug 16, 2024):
Hi @StefH,
Thank you so much; we really need this feature ASAP. Could you please provide an ETA for the next release that will include this fix?
@StefH commented on GitHub (Aug 16, 2024):
Today