Skip to content
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

Resolved Content-Length issue when posting to API endpoint with empty… #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cybernexus
Copy link
Contributor

I have found that several endpoints of the Rest API return LengthRequired along with the following HTTP

`

<TITLE>Length Required</TITLE>

Length Required


HTTP Error 411. The request must be chunked or have a content length.

` This seems to be caused by sending a post request with no Content Length header. This appears to happen when the SDK calls a post request and no content is defined. The solution I came up with was to set a manual default value of zero on the ContentLength property (instead of relying on the compiler default).

This change should also resolve an open support case that I have. The case number is 15879211.

@cybernexus
Copy link
Contributor Author

@ted-spence-avalara This failed CI but I'm not so sure it was due to my changes, the output seems to suggest a problem with the environment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant