-
Notifications
You must be signed in to change notification settings - Fork 35
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
wierd post repeat #130
Comments
Strange, never seen this. Is this consistently reproducible on that machine? Some ideas:
|
it's all running on the same machine, but the different behavior shows up depending on which server I am talking to. The servers are two different rails server apps. Luckily the one that is causing the problem is my own app that I control. I tried updating my bundle to the latest hyperclient from this repo and see the same results. I'll futz with futuroscope too. I'm continuing to debug it. It smells to me like either a content type or encoding problem where HC can't parse the results, or HC is updating it's own internal state of the resource, spotting an error and triggering retry logic, but keeping POST as the method. This line makes me wonder hyperclient/lib/hyperclient/link.rb Line 180 in 7e7dad2
Is there any case where Resource.new will cause some HTTP action to happen? |
I don't think so, but did you try to turn this into a spec? If you can repeat that behavior you can record the spec with VCR and we can repro/fix. |
Im still troubleshooting it, turning it into a spec isn't trivial and I'm not there yet |
Maybe this is Futuroscope-related. If you have a repro, try with #133. |
This occurred in my development as well. Not sure what triggered it as I was just trying things out. I might have triggered it via the https://github.com/charliesome/better_errors console and not in the normal Rails request. But mitmproxy showed a bunch of repeating requests that would go on forever. |
@espen And still present on 0.9.0? (futuroscope was removed) |
@dblock not sure, as it was my initial testing for a rewrite it was probably an older version. Just wanted to comment that I experienced this, sorry for the lack of details. I'm gonna assume it was due to futurescope with the old version but will investigate better if it occurs again. |
Strangest thing ever...
I'm using hyperclient to find a link in a root document, and then doing a _post on it with some json.
On one server this works fine.
On another, hyperclient posts the data correctly, the server returns a 200 OK with a json response body. Then hyperclient repeats the POST to the same URL, but includes the response body it got from the first response.
This then fails with a 422 as it is not a valid request body.
Any idea why hyperclient would decide to repeat a post and send the newly received body instead of what it was told to?
The text was updated successfully, but these errors were encountered: