S
S
Sergey2015-02-26 16:29:33
JavaScript
Sergey, 2015-02-26 16:29:33

Rails + Heroku, short PATCH requests randomly not working - why?

There is a simple admin panel on RoR, hosted on Heroku, consisting mainly of an entity table and simple CRUD operations, most of which are implemented through AJAX. There are buttons for switching boolean fields, PATCH requests in the /foo/4/toggle_bar style, no response is required, there is no more data in the request either. And so these requests on some systems/browsers produce ERR_EMPTY_RESPONSE. After much dancing, I changed the method to POST and forgot, since I had to use the system even now, but I did not find out the nature of the bug.

As a result, the question is - is it really still impossible to fully use PATCH requests or am I doing something wrong?

Some of the things that piss me off:
- caught mostly in Windows/Chrome with the error above, including on fresh chrome. Including, if memory serves, on the new Opera
- I even caught it on one fresh FF, there is generally mysticism: after loading the page, the first two requests pass, the rest - no, without explanation
- on other machines with Windows, Linux, Chrome, Chromium, FF works. I didn’t find the version logic
- on the same page there is a full-fledged AJAX form with a PATCH request and it also works

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dzivalli, 2015-03-10
@dzivalli

Perhaps if the account is free, then Heroku slowly responds and the connection falls off by timeout and, accordingly, the browser does not receive any response.
You need to look in the logs for each specific request, whether it comes to the server, it seems that Heroku can enable logging and it will pour all the logs to the console.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question