Fix Bug 568310 by adding the missing header in requests sent by the webpage.
diff --git a/org.eclipse.om2m.webapp.resourcesbrowser.json/src/main/resources/webapps/om2m.js b/org.eclipse.om2m.webapp.resourcesbrowser.json/src/main/resources/webapps/om2m.js
index 1d6e362..713bc14 100644
--- a/org.eclipse.om2m.webapp.resourcesbrowser.json/src/main/resources/webapps/om2m.js
+++ b/org.eclipse.om2m.webapp.resourcesbrowser.json/src/main/resources/webapps/om2m.js
@@ -68,7 +68,7 @@
beforeSend: function(){},
dataType: "json",
url: context + targetId + "?rcn=5&lvl=1",
- headers : {"X-M2M-Origin" : make_base_auth(username, password), "Accept":"application/json"},
+ headers : {"X-M2M-Origin" : make_base_auth(username, password), "Accept":"application/json", "X-M2M-RI":"OM2M-webpage"},
success: function(response){
$("#login").hide();
$("#main").show();
@@ -240,7 +240,7 @@
$.ajax({
type: 'POST',
url: context+url,
- headers: {"X-M2M-Origin":make_base_auth(username,password)},
+ headers: {"X-M2M-Origin":make_base_auth(username,password), "X-M2M-RI":"OM2M-webpage"},
beforeSend: function() {
},
timeout: 20000,
@@ -259,7 +259,7 @@
$.ajax({
type: 'GET',
url: context+url,
- headers: {"X-M2M-Origin":make_base_auth(username,password)},
+ headers: {"X-M2M-Origin":make_base_auth(username,password), "X-M2M-RI":"OM2M-webpage"},
beforeSend: function() {
},
timeout: 20000,
@@ -287,7 +287,7 @@
$.ajax({
type: 'POST',
url: context+'/'+url,
- headers: {"X-M2M-Origin":make_base_auth(username,password)},
+ headers: {"X-M2M-Origin":make_base_auth(username,password), "X-M2M-RI":"OM2M-webpage"},
beforeSend: function() {
},
timeout: 20000,
diff --git a/org.eclipse.om2m.webapp.resourcesbrowser.xml/src/main/resources/webapps/om2m.js b/org.eclipse.om2m.webapp.resourcesbrowser.xml/src/main/resources/webapps/om2m.js
index 342efed..fa02a88 100644
--- a/org.eclipse.om2m.webapp.resourcesbrowser.xml/src/main/resources/webapps/om2m.js
+++ b/org.eclipse.om2m.webapp.resourcesbrowser.xml/src/main/resources/webapps/om2m.js
@@ -65,7 +65,8 @@
url: context + targetId + "?rcn=5&lvl=1",
headers: {
"X-M2M-Origin": make_base_auth(username, password),
- "Accept": "application/xml"
+ "Accept": "application/xml",
+ "X-M2M-RI": "OM2M-webpage-xml"
},
success: function(response) {
$("#login").hide();
@@ -236,7 +237,8 @@
type: 'POST',
url: context + url,
headers: {
- "X-M2M-Origin": make_base_auth(username, password)
+ "X-M2M-Origin": make_base_auth(username, password),
+ "X-M2M-RI": "OM2M-webpage-xml"
},
beforeSend: function() {},
timeout: 20000,
@@ -270,7 +272,8 @@
type: 'GET',
url: context + url,
headers: {
- "X-M2M-Origin": make_base_auth(username, password)
+ "X-M2M-Origin": make_base_auth(username, password),
+ "X-M2M-RI": "OM2M-webpage-xml"
},
beforeSend: function() {},
timeout: 20000,
@@ -306,7 +309,8 @@
type: 'POST',
url: context + '/' + url,
headers: {
- "X-M2M-Origin": make_base_auth(username, password)
+ "X-M2M-Origin": make_base_auth(username, password),
+ "X-M2M-RI": "OM2M-webpage-xml"
},
beforeSend: function() {},
timeout: 20000,