-
Notifications
You must be signed in to change notification settings - Fork 79
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
Pact client doesn't send DELETE requests with body correctly #183
Comments
Also, I understand that it's not the Pact library's fault, but one of the underlying HTTP client. But I'm having a hard time figuring out which one. Is it |
You might want to open an issue on pact-ruby. (@bethesque - is that the right place? I'm surprised we haven't hit this before). |
@jnazander can you confirm that this issue exists if you call
you can see the options with
|
@TimothyJones
|
Created an issue in |
Thanks. That means the issue definitely lies with the ruby implementation. I'm not sure whether the right place to raise it is pact-provider-verifier or pact-ruby. Can you open an issue over on one of those? I'll leave this issue open because we'll need to upgrade the pact-standalone version once it is fixed. |
Nice, our messages crossed. Thanks for being so proactive! |
Releasing v10.2.4, which should have a fixed version of pact-standalone. Let us know how you go |
Someone else had this issue recently, and I told them I didn't think it could be fixed. Will have to do a search of all the issues and try and track it down. |
Software versions
Expected behaviour
Pact mock client during pact provider tests should send HTTP DELETE requests with HTTP body correctly.
Actual behaviour
It doesn't send HTTP DELETE requests correctly.
I'm using Node.js with Express framework as the server, and I'm running pact provider tests / pact verifications. One of the pact interactions is a DELETE request that has a request body (The spec does not forbid it). All other requests go through fine, but the delete request seemingly makes the server freeze and not return anything until the timeout, at which it resets the HTTP connection (see the pact provider log attached).
Upon further investigation with Wireshark I found out the underlying problem: the pact mock client doesn't even send all of the TCP packets that make up the HTTP DELETE request - it stops short of sending the body. This makes the server wait for the remaining packet, which never comes, thus hanging the test until it times out.
Interestingly, it does send
Content-Length: 15
in the first packet, indicating that there will be a body in the following packet(s), but it never sends it.Steps to reproduce
Try to verify a pact with the following interaction:
(or any pact that has a HTTP DELETE method with a request body).
Relevant log files
Log file generated by pact provider test attached.
pact-provider.log
The text was updated successfully, but these errors were encountered: