![]() Registered Member ![]()
|
Cannot import from discover card since late Feb.
According to http://www.ofxhome.com/ofxforum/viewtopic.php?id=47793, Discover now require http header to be in exact order, and it is unlikely for Discover to change that.
I checked https://github.com/KDE/kmymoney/blob/4. ... artner.cpp but being unfamiliar to code case I don't know how should the code be changed to workaround the issue. Any suggestions? |
![]() KDE Developer ![]()
|
The actual request is created in bool KOfxDirectConnectDlg::init() which can be found in https://github.com/KDE/kmymoney/blob/4.8/kmymoney/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp . The problem is that the metadata handling is completely handled within KIO::TransferJob which we simply utilize. The metadata is transported using a QMap<QString key, QString value> container, so changing/controlling the order of the entries is not that easy.
It looks like the order of HTTP Headers doesn't matter for headers with different names. If there are multiple headers with the same name, however, the order is important. More details can be found in the respective RFC. If the bank's server still requires a certain order it is simply not compliant with the RFC and thus broken (just like so many other bank systems).
ipwizard, proud to be a member of the KMyMoney forum since its beginning.
![]() openSuSE Leap 15.4 64bit, KF5 |
![]() Registered Member ![]()
|
Ok, tried a few things and finally settled with one dirty workaround for myself. Basically changed the code to call a custom python 2 script (which use httplib to fine control the header order) to send the ofx request first, and if not succeeded (script return non 0 code) then fallback to original code path.
Obviously this is not good for a PR. Just in case anyone hit same problem and is interested https://github.com/Zhuoqing/kmymoney_di ... 8a4d8231d9 |
Registered users: Bing [Bot], Google [Bot]