You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@N1cOs I have created a PR for this. Ultimately I'm not so sure if this is something that should or shouldn't be merged in and supported as the omission of the Content-Length header seems to be something of an undocumented (that or documentation on this is very difficult to find) side effect in the standard http library when the resty request is built with http.NewRequest.
@Libero-Dev thanks for the fix. IMO it should be fix. Standard http library has the logic for handling a nil body. For instance, this code snippet writes Content-Length header in the request:
Hello! Recently we faced with a problem, that resty Client doesn't set
Content-Length
header for an empty POST request.Version - 2.16.5.
Example:
Then I captured request with Wireshark and
Content-Length
header is missing:The text was updated successfully, but these errors were encountered: