Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034283Retail ModulesStoreServerpublic2016-10-24 15:552017-01-17 13:46
mtaal 
mtaal 
normalminorhave not tried
closedfixed 
5
 
RR16Q4.1RR16Q4.1 
marvintm
No
0034283: Support different protocols (http and https) for store and central server
Currently we don't support different protocols http and https for the central server. If for example the store has http:// and the central server has https:// then still WebPOS will try to call central with http://. [^] The central server will try to redirect webpos to https://. [^] However an error is thrown [1], this is not supported in cross domain pre-flight requests [2].

[1]
XMLHttpRequest cannot load http://testhipertextil.practicsbs.com/openbravo/org.openbravo.mobile.core.service.jsonrest/org.openbravo.retail.posterminal.ProcessCashMgmtMaster. [^] Response for preflight is invalid (redirect)

[2]
http://stackoverflow.com/questions/23412037/302-redirect-after-cors-preflight [^]
install central and store
use https for central
http for store
login in to the store
stop store server
work offline on store server --> errors show up
Don't strip http/https from the url when sending to the client [1]
Check when setting the server in the request router code that the http/https is there. If so then don't prefix the location.protocol

[1]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/6e967b9921b3/src/org/openbravo/mobile/core/login/MobileCoreLoginUtilsServlet.java#l206 [^]

[2]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/6e967b9921b3/web/org.openbravo.mobile.core/source/data/ob-requestrouter.js#l656 [^]



No tags attached.
blocks defect 0034282RR17Q1 closed mtaal Support different protocols (http and https) for store and central server 
Issue History
2016-10-24 15:55mtaalTypedefect => backport
2016-10-24 15:55mtaalTarget VersionRR17Q1 => RR16Q4
2016-12-06 10:53hgbotCheckin
2016-12-06 10:53hgbotNote Added: 0092115
2016-12-06 10:53hgbotStatusscheduled => resolved
2016-12-06 10:53hgbotResolutionopen => fixed
2016-12-06 10:53hgbotFixed in SCM revision => http://code.openbravo.com/retail/backports/3.0RR16Q4/org.openbravo.mobile.core/rev/9cf608fa0f7ee3543fb5b5fec4bd90c0c7675e8f [^]
2016-12-06 10:53hgbotCheckin
2016-12-06 10:53hgbotNote Added: 0092117
2016-12-06 10:53hgbotFixed in SCM revisionhttp://code.openbravo.com/retail/backports/3.0RR16Q4/org.openbravo.mobile.core/rev/9cf608fa0f7ee3543fb5b5fec4bd90c0c7675e8f [^] => http://code.openbravo.com/retail/backports/3.0RR16Q4/org.openbravo.mobile.core/rev/a27a3351ef17e839c3953e9663391bd7a6e71587 [^]
2016-12-06 10:55hgbotCheckin
2016-12-06 10:55hgbotNote Added: 0092133
2016-12-06 10:55hgbotFixed in SCM revisionhttp://code.openbravo.com/retail/backports/3.0RR16Q4/org.openbravo.mobile.core/rev/a27a3351ef17e839c3953e9663391bd7a6e71587 [^] => http://code.openbravo.com/retail/backports/3.0RR16Q4/org.openbravo.retail.posterminal/rev/e3cdf7ed0bdd73391b681571e97cde589ee11073 [^]
2016-12-06 10:55hgbotCheckin
2016-12-06 10:55hgbotNote Added: 0092135
2016-12-06 10:55hgbotFixed in SCM revisionhttp://code.openbravo.com/retail/backports/3.0RR16Q4/org.openbravo.retail.posterminal/rev/e3cdf7ed0bdd73391b681571e97cde589ee11073 [^] => http://code.openbravo.com/retail/backports/3.0RR16Q4/org.openbravo.retail.posterminal/rev/0bcc4640b61abc1720376ff956e9ad63ed7d4d7b [^]
2016-12-07 12:00mtaalTarget VersionRR16Q4 => RR16Q4.1
2016-12-07 12:05hgbotCheckin
2016-12-07 12:05hgbotNote Added: 0092173
2016-12-07 12:05hgbotCheckin
2016-12-07 12:05hgbotNote Added: 0092175
2016-12-07 12:05hgbotCheckin
2016-12-07 12:05hgbotNote Added: 0092177
2016-12-07 12:05hgbotCheckin
2016-12-07 12:05hgbotNote Added: 0092179
2016-12-07 12:06OrekariaStatusresolved => new
2016-12-07 12:06OrekariaResolutionfixed => open
2016-12-07 12:06OrekariaStatusnew => scheduled
2016-12-27 11:23mtaalReview Assigned To => marvintm
2016-12-27 11:26hgbotCheckin
2016-12-27 11:26hgbotNote Added: 0093014
2016-12-27 11:28hgbotCheckin
2016-12-27 11:28hgbotNote Added: 0093015
2016-12-27 11:28hgbotStatusscheduled => resolved
2016-12-27 11:28hgbotResolutionopen => fixed
2016-12-27 11:28hgbotFixed in SCM revisionhttp://code.openbravo.com/retail/backports/3.0RR16Q4/org.openbravo.retail.posterminal/rev/0bcc4640b61abc1720376ff956e9ad63ed7d4d7b [^] => http://code.openbravo.com/retail/backports/3.0RR16Q4.1/org.openbravo.mobile.core/rev/77f92549d3d0b81fd68c23a9d5df3a3224fa2769 [^]
2017-01-17 13:46marvintmStatusresolved => closed
2017-01-17 13:46marvintmFixed in Version => RR16Q4.1

Notes
(0092115)
hgbot   
2016-12-06 10:53   
Repository: retail/backports/3.0RR16Q4/org.openbravo.mobile.core
Changeset: 9cf608fa0f7ee3543fb5b5fec4bd90c0c7675e8f
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Wed Oct 26 08:29:02 2016 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR16Q4/org.openbravo.mobile.core/rev/9cf608fa0f7ee3543fb5b5fec4bd90c0c7675e8f [^]

Fixed issue 34283, backport of issue 34282: Support different protocols (http and https) for store and central server
Don't take of http from server address when creating list of server jsons to be send to the client
On the client prefix/set the right protocol when the current server or not yet set
Determine in a better way if the server is a current server

---
M src/org/openbravo/mobile/core/login/MobileCoreLoginUtilsServlet.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
---
(0092117)
hgbot   
2016-12-06 10:53   
Repository: retail/backports/3.0RR16Q4/org.openbravo.mobile.core
Changeset: a27a3351ef17e839c3953e9663391bd7a6e71587
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Oct 27 21:38:21 2016 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR16Q4/org.openbravo.mobile.core/rev/a27a3351ef17e839c3953e9663391bd7a6e71587 [^]

Fixes issue 34283, backport of issue 34282: Support different protocols (http and https) for store and central server
Make sure that there is only one current server and also use the correct part of the url to set the currentserver
if none was defined on the server

---
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
---
(0092133)
hgbot   
2016-12-06 10:55   
Repository: retail/backports/3.0RR16Q4/org.openbravo.retail.posterminal
Changeset: e3cdf7ed0bdd73391b681571e97cde589ee11073
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Wed Oct 26 08:30:03 2016 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR16Q4/org.openbravo.retail.posterminal/rev/e3cdf7ed0bdd73391b681571e97cde589ee11073 [^]

Fixes issue 34283, backport of issue 34282: Support different protocols (http and https) for store and central server
Determine in a better/more performant way if the server definition is for the current server.

---
M src/org/openbravo/retail/posterminal/LoginUtilsServlet.java
---
(0092135)
hgbot   
2016-12-06 10:55   
Repository: retail/backports/3.0RR16Q4/org.openbravo.retail.posterminal
Changeset: 0bcc4640b61abc1720376ff956e9ad63ed7d4d7b
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Oct 27 21:40:12 2016 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR16Q4/org.openbravo.retail.posterminal/rev/0bcc4640b61abc1720376ff956e9ad63ed7d4d7b [^]

Fixes issue 34283, backport of issue 34282: Support different protocols (http and https) for store and central server
Partially rollback earlier changeset, only keep the part related to selecting the correct
multi-server

---
M src/org/openbravo/retail/posterminal/LoginUtilsServlet.java
---
(0092173)
hgbot   
2016-12-07 12:05   
Repository: retail/backports/3.0RR16Q4/org.openbravo.mobile.core
Changeset: 2dd544569b1e6ec89e7d4b2af5e4727c106498b8
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Wed Dec 07 12:04:14 2016 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR16Q4/org.openbravo.mobile.core/rev/2dd544569b1e6ec89e7d4b2af5e4727c106498b8 [^]

Backed out changeset: a27a3351ef17; issue 34283, backport of issue 34282

---
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
---
(0092175)
hgbot   
2016-12-07 12:05   
Repository: retail/backports/3.0RR16Q4/org.openbravo.mobile.core
Changeset: 24c8a0236915f5fcd950d6f6ef3175bdaeda08b6
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Wed Dec 07 12:04:20 2016 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR16Q4/org.openbravo.mobile.core/rev/24c8a0236915f5fcd950d6f6ef3175bdaeda08b6 [^]

Backed out changeset: 9cf608fa0f7e; issue 34283, backport of issue 34282

---
M src/org/openbravo/mobile/core/login/MobileCoreLoginUtilsServlet.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
---
(0092177)
hgbot   
2016-12-07 12:05   
Repository: retail/backports/3.0RR16Q4/org.openbravo.retail.posterminal
Changeset: 51bfa1f6797b1688afd0e225f47deb3598827348
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Wed Dec 07 12:03:49 2016 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR16Q4/org.openbravo.retail.posterminal/rev/51bfa1f6797b1688afd0e225f47deb3598827348 [^]

Backed out changeset: 0bcc4640b61a; issue 34283, backport of issue 34282

---
M src/org/openbravo/retail/posterminal/LoginUtilsServlet.java
---
(0092179)
hgbot   
2016-12-07 12:05   
Repository: retail/backports/3.0RR16Q4/org.openbravo.retail.posterminal
Changeset: ea84cef08404d79b57589d09507897168a752382
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Wed Dec 07 12:03:59 2016 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR16Q4/org.openbravo.retail.posterminal/rev/ea84cef08404d79b57589d09507897168a752382 [^]

Backed out changeset: e3cdf7ed0bdd; issue 34283, backport of issue 34282

---
M src/org/openbravo/retail/posterminal/LoginUtilsServlet.java
---
(0093014)
hgbot   
2016-12-27 11:26   
Repository: retail/backports/3.0RR16Q4.1/org.openbravo.retail.posterminal
Changeset: b53c8a6fa29e597d18e6c92266d8d65847f50ea0
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Dec 27 11:26:32 2016 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR16Q4.1/org.openbravo.retail.posterminal/rev/b53c8a6fa29e597d18e6c92266d8d65847f50ea0 [^]

Related to issue 34283: Support different protocols (http and https) for store and central server
Current server is set in MobileCoreLoginUtilsServlet, not needed to set in retail posterminal
login utils servlet

---
M src/org/openbravo/retail/posterminal/LoginUtilsServlet.java
---
(0093015)
hgbot   
2016-12-27 11:28   
Repository: retail/backports/3.0RR16Q4.1/org.openbravo.mobile.core
Changeset: 77f92549d3d0b81fd68c23a9d5df3a3224fa2769
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Dec 27 11:27:53 2016 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR16Q4.1/org.openbravo.mobile.core/rev/77f92549d3d0b81fd68c23a9d5df3a3224fa2769 [^]

Fixes issue 34283: Support different protocols (http and https) for store and central server
Don't take of http from server address when creating list of server jsons to be send to the client
On the client prefix/set the right protocol when the current server or not yet set
Determine in a better way if the server is a current server

---
M src/org/openbravo/mobile/core/login/MobileCoreLoginUtilsServlet.java
M src/org/openbravo/mobile/core/servercontroller/MobileServerController.java
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
---