When performing HTTP Requests I receive a '301 MOVED PERMANTLY'.
On GET requests I get automatically redirected and the GET performs a retry resulting in a correct response.
However on PUT requests I receive the '301 MOVED PERMANTLY' but nothing happens afterwards (no retries, no response) which causes the element to go into timeout.
Is DataMiner supposed to send retries on PUT / POST / PATCH requests?
Note: Doing the PUT request in Postman does work.
Note2: I'm not using the option 'customRedirect' in the CommunicationOptions.
Redirect on GET:
Redirect on PUT:
Hi,
DataMiner is using WinHTTP to handle the requests. This means by default for GET requests that all redirects are followed, except those that originate from a secure https URL to an unsecure http URL.
For example POST messages will not automatically be redirected. This is compliant to RFC 1945 section 9.3 Redirection 3xx:
If the 301 status code is received in response to a request using the POST method, the user agent must not automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.
In fact, according to RFC 1945, only GET or HEAD methods are the only ones that may be automatically redirected. This implies that PUT is also not allowed to be automatically redirected:
<span id="autoid-46" class="h3">9.3 Redirection 3xx</span> This class of status code indicates that further action needs to be taken by the user agent in order to fulfill the request. The action required may be carried out by the user agent without interaction with the user if and only if the method used in the subsequent request is GET or HEAD.
Regards,