WebRequest(): how to handle HTTP 303 response downloading shared files from Google Drive? - page 2

 
Fernando Carreiro #:

Did you try my suggestion of just using the parent domain name?

Yes, I tried the parent domain too... In the meantime, I found another URL format that works straight to HTTP 200 (without intermediary HTTP 303) but it returns an HTML page to view/edit the file, not the the raw document 🙁

https://drive.google.com/file/d/1-PtADmc85Tws_RcRF9nGJ0LkkBvv3DWO/

 
Dmitri Diall #:Yes, I tried the parent domain too... In the meantime, I found another URL format that works straight to HTTP 200 (without intermediary HTTP 303) but it returns an HTML page to view/edit the file, not the the raw document 🙁 https://drive.google.com/file/d/1-PtADmc85Tws_RcRF9nGJ0LkkBvv3DWO/
Then I guess it is back to the drawing board.
 
There is an easy fix. 303 should be handled automatically by modern clients but not, it seems by MT5. Easy fix, use MT4.
 
@Arthur Joseph Mcalister #: There is an easy fix. 303 should be handled automatically by modern clients but not, it seems by MT5. Easy fix, use MT4.

How is that an "easy fix"? Not to mention that MT4's WebRequest is even less developed than MT5's version.

 
Fernando Carreiro #:

How is that an "easy fix"? Not to mention that MT4's WebRequest is even less developed than MT5's version.

I consider working to be more developed than not working. Perhaps Metaquotes have a different definition.

 
Fernando Carreiro #:

How is that an "easy fix"? Not to mention that MT4's WebRequest is even less developed than MT5's version.

Not quite sure what did you mean by your "less evolved" comment, Fernando... Could you clarify please?

My understanding is that WebRequest() may have had some new bug introduced in MT5, relative to the MT4 version... What's the best route to report this to MetaQuotes? (Even if I am not terribly hopeful in a quick fix? ;-)

 
Dmitri Diall #:Not quite sure what did you mean by your "less evolved" comment, Fernando... Could you clarify please? My understanding is that WebRequest() may have had some new bug introduced in MT5, relative to the MT4 version... What's the best route to report this to MetaQuotes? (Even if I am not terribly hopeful in a quick fix? ;-)

Development on MT4 has stopped for several years now.

However, if you wish to test if MT4 WebRequest, then code a test sample to see if it works on MQL4 or not.

Yes, it is true that the MT5 may have a bug, and you can report it either in the Russian section or via the Service Desk.

 
Arthur Joseph Mcalister #:I consider working to be more developed than not working. Perhaps Metaquotes have a different definition.

Given that MT4 has not been further developed for several years now, it cannot be "more developed", no matter how you spin it.

However, the MT5 implementation, could have bugs in it.

 
string result_headers;
string user_agent = "User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36";
char post[],result[];
int res = WebRequest("GET",web_url,user_agent,timeout,post,result,result_headers);

Some sites are having trouble with "user agent" being empty, try the other form, it is perceived as communicating from chrome, not metatrader
 
Mustafa Damgaci #:

Some sites are having trouble with "user agent" being empty, try the other form, it is perceived as communicating from chrome, not metatrader

Thanks for the suggestion, but Google Drive still redirects with HTTP 303 :-(