Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9.0 Beta 2
-
None
-
macOS 10.12.3(16D32)Clang 7.0 (Apple), 64 bit
-
dcf5ced32293d19cb5a10de12e91a77edb0f3c68
Description
When combining OAuth2 and QOAuthOobReplyHandler the Dropbox API's /oauth2/token endpoint fails.
Apparently, it seems that "Content-type" included in this endpoint reply is returned by "text/javascript" instead of "application/json".
The specification about "Content-type" of this endpoint is not written in API document.
It seems that it always fails in networkReplyFinished() in qoauthoobreplyhandler.cpp because text/javascript" is not permitted.
Reference link:
- Dropbox API v2 document
https://www.dropbox.com/developers/documentation/http/documentation - NetworkStorageAccessSample
https://github.com/sharkpp/NetworkStorageAccessSample
In this source, it is designed to work by applying a monkey patch.
dropbox.cpp, 'fix content-type, "text/javascript" to "application/json"' comments
Needs:
DEFINES+=DROPBOX_APP_KEY=" {dropbox app key}" DEFINES+=DROPBOX_APP_SECRET="
{dropbox app secret}"
in QMake addtional options.