You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
The objective of this topic is to communicate a bug to MetaQuotes, I sent it to tickets system, but there is no tickets system anymore. :-(
Some releases behind MT5 came with some bugs in the WebRequest function and aparently the problems were solved, but, I got a new one in the release 1881.
When the WebRequest function sends a request, it gets a return code and the answer in the "result" array, so, in a normal situation the return code is 200 and the array "result" is the status of the operation.
These are the parameters of the WebRequest function:
The problem:
In my EA the WebRequest function sends some data to my server and the server returns a string with the status of the operation and the code 201, that, according to W3C, 201 is the code to new data created (https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html). So, WebRequest function gets the code 201, clear the "result" array and set the "_LastError" variable to 5203 (HTTP request failed).
* First big deal: the "result" array should never be cleared, with or without an error. This array can have infomations about the error.
* Second big deal: returning a code different than 200 doesn't meaning an error. See the definitions in W3C site.
* Third deal: the string "result_headers" also have no content, it is NULL;
Sorry to not sharing any code, it is confidential.