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

Content-Length incorrect when initializing body with this.class.getResourceAsStream #1119

Open
BowenHuang80 opened this issue Jan 10, 2019 · 0 comments

Comments

@BowenHuang80
Copy link

InputStream reqBody = RestAssuredTest.class.getResourceAsStream("requestbody.xml");

	given()
	.request()
	.body(reqBody)
	.baseUri("http://scooterlabs.com/echo")
	.header("Host", "scooterlabs.com")
	.header("Content-Type", "text/xml; charset=\"UTF-8\"")
	.header("Accept-Encoding", "gzip,deflate")
	.header("Accept", "*/*")
	.post()
	.print();

The echoed request shows the size is incorrect.

Here is the file requestbody.xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
soapenv:Header/
soapenv:Body
tem:Add
tem:intA100</tem:intA>
tem:intB356</tem:intB>
</tem:Add>
</soapenv:Body>
</soapenv:Envelope>

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

No branches or pull requests

1 participant