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

Set Content-Length header in response #843

Merged
merged 3 commits into from
Mar 28, 2022
Merged

Set Content-Length header in response #843

merged 3 commits into from
Mar 28, 2022

Conversation

acveigas
Copy link
Contributor

Came across few SOAP clients which require Content-Length header to be set in order for the SOAP request to go through.
Without this change, Content-Length header is not set and Transfer-Encoding is chunked

Reduced build warnings

Added Custom string writer fixing a test case
@acveigas
Copy link
Contributor Author

acveigas commented Mar 23, 2022

@andersjonsson Can you approve the Github actions (Pipelines)?

@andersjonsson
Copy link
Collaborator

Thanks for the PR!
I’ll take a closer look later today

@acveigas
Copy link
Contributor Author

Thanks. I Will also look at the CodeQL failure later on this week.

Thanks for the PR!

I’ll take a closer look later today

Copy link
Collaborator

@andersjonsson andersjonsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few notes.

src/SoapCore/CustomStringWriter.cs Show resolved Hide resolved
@andersjonsson andersjonsson merged commit 7b61609 into DigDes:develop Mar 28, 2022
@andersjonsson
Copy link
Collaborator

@acveigas Damn, I need to learn to read better 😆

I thought you changed Content-Length to the number of bytes.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Length

Try sending a character that is represented by two bytes, like ü or é. Maybe your legacy client will accept whatever in the header, but I think the correct behavior would be to set the header to the number of bytes.

What do you think?

@acveigas
Copy link
Contributor Author

I can send a PR with number of bytes. Shouldn't take time 😊

@andersjonsson
Copy link
Collaborator

I can send a PR with number of bytes. Shouldn't take time 😊

Thanks!

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.

None yet

2 participants