'Different servers receive 200 and 410 status codes for the same URL
I am trying to access a website's API by Python's request library.
This is done from different servers (hosted by Hetzner). For some reason, one of the servers is getting 410 response status code, while the others work just fine (status code 200).
I tested the exact URL amongst the servers, and it seems that the problem is in this specific server.
The weird thing that I don't understand is: How is this possible? isn't it that status code 410 points on a gone page? it should be the same in all the servers.
** Note: The code is exactly the same in all the servers.
Solution 1:[1]
Turns out that this website's API blocked this specific IP, and responded 410 on purpose.
It is some kind of mechanism that websites use to handle bots: they respond 410 to make them think this endpoint doesn't exist.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | SaharCo |