Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034284Retail ModulesStoreServerpublic2016-10-24 15:552016-11-16 13:17
mtaal 
mtaal 
normalminorhave not tried
closedfixed 
5
 
RR16Q3.3 
migueldejuana
No
0034284: 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 => RR16Q3.3
2016-10-25 00:10mtaalReview Assigned To => migueldejuana
2016-10-25 00:11hgbotCheckin
2016-10-25 00:11hgbotNote Added: 0090833
2016-10-25 00:11hgbotStatusscheduled => resolved
2016-10-25 00:11hgbotResolutionopen => fixed
2016-10-25 00:11hgbotFixed in SCM revision => http://code.openbravo.com/retail/backports/3.0RR16Q3.3/org.openbravo.mobile.core/rev/d56eb00eb3f0de2f8a97330b592a4bd413d56b33 [^]
2016-11-16 13:17migueldejuanaNote Added: 0091601
2016-11-16 13:17migueldejuanaStatusresolved => closed

Notes
(0090833)
hgbot   
2016-10-25 00:11   
Repository: retail/backports/3.0RR16Q3.3/org.openbravo.mobile.core
Changeset: d56eb00eb3f0de2f8a97330b592a4bd413d56b33
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Oct 25 00:11:29 2016 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR16Q3.3/org.openbravo.mobile.core/rev/d56eb00eb3f0de2f8a97330b592a4bd413d56b33 [^]

Fixes issue 34284: Support different protocols (http and https) for store and central server
Do not strip off the http/https, only add it if needed in the client side code

---
M src/org/openbravo/mobile/core/login/MobileCoreLoginUtilsServlet.java
M web/org.openbravo.mobile.core/source/data/ob-requestrouter.js
---
(0091601)
migueldejuana   
2016-11-16 13:17   
Reviewed