-
-
Notifications
You must be signed in to change notification settings - Fork 737
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
Extra requests for same hostname fail unexpectedly #870
Comments
Interesting @paulmelnikow. I actually just encountered a very similar issue using |
Hmmm, interesting. After running the first snippet I have one fixture. The second snippet crashes so it doesn't save anything else. [
{
"scope": "http://httpbin.org:80",
"method": "GET",
"path": "/get?foo=1",
"body": "",
"status": 200,
"response": {
"args": {
"foo": "1"
},
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip,deflate",
"Connection": "close",
"Host": "httpbin.org",
"User-Agent": "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
},
"origin": "158.222.233.85",
"url": "http://httpbin.org/get?foo=1"
},
"rawHeaders": [
"Connection",
"close",
"Server",
"gunicorn/19.7.1",
"Date",
"Fri, 21 Apr 2017 04:12:20 GMT",
"Content-Type",
"application/json",
"Access-Control-Allow-Origin",
"*",
"Access-Control-Allow-Credentials",
"true",
"Content-Length",
"322",
"Via",
"1.1 vegur"
]
}
] If I reverse the order of the http calls in the second snippet, the Given that, I wouldn't suppose it's related to what you're seeing. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We try to do our best, but nock is maintained by volunteers and there is only so much we can do at a time. Thank you for your contributions. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue and add a reference to this one if it’s related. Thank you! |
Just found this linked from an old issue, and wonder if it's worth tracking down 😀 |
@paulmelnikow can this still be reproduced since v11? Maybe a runkit would be appropriate. |
Yea, other than needing to update the IP address for httpbin.org this seems to behave just as before on master. Here's a RunKit: https://runkit.com/melnikow/5d94feb55b27e1001bd046e5 If you swap the commented line and the uncommented line I suppose this has something to do with |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We try to do our best, but nock is maintained by volunteers and there is only so much we can do at a time. Thank you for your contributions. |
Hi, thanks for your work on this useful library!
I'm using Nock Back to write some experimental tests for shields and I'm running into a bit of difficulty. Based on the description of the dryrun and record modes, I'd expect these modes to allow any http call. The behavior I'm seeing is that they don't allow http calls to hosts which have some nocks.
Here's a minimal-ish test:
^^ Prints 'groovy' as expected.
^^ Expected 'groovy' but instead:
By contrast, this example with a different hostname works fine:
I've combed through lib/back.js. My impression is that the problem is somewhere deeper. Any ideas?
The text was updated successfully, but these errors were encountered: