-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Response Header Content-Length not available when call HEAD Method #720
Comments
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. {
var headers = new Dictionary<string, string>
{
{ "Accept", "text/html" }, // OK
{ "Connection", "keep-alive" }, // OK
{ "Content-Length", responseBody.Length.ToString() }, // OK
{ "Content-Type", "text/html; charset=utf-8" }, // OK
{ "Date", "Fri, 06 Mar 2019 17:36:11 GMT" }, // OK
{ "Expect", "100-continue" }, // OK
{ "Host", "developer.mozilla.org" }, // OK
{ "If-Modified-Since", "Wed, 21 Oct 2015 07:28:00 GMT" }, // OK
{ "Keep-Alive", "timeout=5, max=1000" }, // OK
{ "Range", "bytes=0-499, -500" }, // OK
{ "Referer", "developer.mozilla.org/en-US/docs/Web/JavaScript" }, // OK
**// { "Transfer-Encoding", "compress" }, // 500 Internal Server Error**
{ "User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0" }, // OK
{ "Proxy-Connection", "keep-alive" }, // OK
{ "WWW-Authenticate", "Basic YWxhZGRpbjpvcGVuc2VzYW1l" } // OK
};
...
...
.WithHeaders(headers)
...
...
} |
@bangush https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD |
As is visible in the quote:
Per RFC9110, although:
So although a HEAD response is not required to have a |
Hi @StefH, Is this issue going to be fixed? A head response returns the content-length of the file but WireMock not. |
I will have a look if it's possible to support content-lenght for head. |
Today |
Refer to the Previous Bug #136 and Bug #137. When call HEAD Method the Cotent-Length is not available.
The text was updated successfully, but these errors were encountered: