Skip to content

Commit 15f22a3

Browse files
committed
Pick up new mime types.
1 parent 5910157 commit 15f22a3

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

java/src/com/swiftnav/sbp/drivers/SBPDriverHTTP.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ protected void openStream() throws IOException {
2626
//http.setDoOutput(true);
2727
//http.setChunkedStreamingMode(200);
2828
http.setRequestProperty("Device-Uid", uid);
29-
http.setRequestProperty("Accept", "application/vnd.swiftnav.broker.v1+sbp");
29+
http.setRequestProperty("Accept", "application/vnd.swiftnav.broker.v1+sbp2");
3030
//http.setRequestProperty("Content-Type", "application/sbp");
3131

3232
http.connect();

javascript/test_http_stream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var options = {
66
url: 'http://broker.testing.skylark.swiftnav.com',
77
headers: {
88
'Device-Uid': 'cb781db1-8e5f-5a65-980a-fef75f4b6519',
9-
'Accept': 'application/vnd.swiftnav.broker.v1+sbp'
9+
'Accept': 'application/vnd.swiftnav.broker.v1+sbp2'
1010
}
1111
};
1212

python/sbp/client/drivers/network_drivers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class HTTPException(Exception):
9696
DEFAULT_RETRIES = (MAX_CONNECT_RETRIES, MAX_READ_RETRIES)
9797
MAX_REDIRECTS = 0
9898
DEFAULT_BACKOFF_FACTOR = 0.2
99-
BROKER_SBP_TYPE = 'application/vnd.swiftnav.broker.v1+sbp'
99+
BROKER_SBP_TYPE = 'application/vnd.swiftnav.broker.v1+sbp2'
100100

101101
class HTTPDriver(BaseDriver):
102102
"""HTTPDriver

python/tests/sbp/client/test_driver.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ def test_http_test_pass():
6767
register_uri(GET,
6868
BASE_STATION_URI,
6969
msg.to_binary(),
70-
content_type="application/vnd.swiftnav.broker.v1+sbp")
70+
content_type="application/vnd.swiftnav.broker.v1+sbp2")
7171
register_uri(PUT,
7272
BASE_STATION_URI,
7373
'',
74-
content_type="application/vnd.swiftnav.broker.v1+sbp")
74+
content_type="application/vnd.swiftnav.broker.v1+sbp2")
7575
with HTTPDriver(device_uid="Swift22", url=BASE_STATION_URI) as driver:
7676
assert not driver.read_ok
7777
assert driver.connect_read()
@@ -102,12 +102,12 @@ def test_http_test_fail():
102102
register_uri(GET,
103103
BASE_STATION_URI,
104104
msg.to_binary(),
105-
content_type="application/vnd.swiftnav.broker.v1+sbp",
105+
content_type="application/vnd.swiftnav.broker.v1+sbp2",
106106
status=400)
107107
register_uri(PUT,
108108
BASE_STATION_URI,
109109
'',
110-
content_type="application/vnd.swiftnav.broker.v1+sbp",
110+
content_type="application/vnd.swiftnav.broker.v1+sbp2",
111111
status=400)
112112
with HTTPDriver(device_uid="Swift22", url=BASE_STATION_URI) as driver:
113113
assert not driver.connect_read()
@@ -129,12 +129,12 @@ def test_http_test_pass_streaming():
129129
register_uri(GET,
130130
BASE_STATION_URI,
131131
mock_streaming_msgs([m.to_binary() for m in msgs]),
132-
content_type="application/vnd.swiftnav.broker.v1+sbp",
132+
content_type="application/vnd.swiftnav.broker.v1+sbp2",
133133
streaming=True)
134134
register_uri(PUT,
135135
BASE_STATION_URI,
136136
body='',
137-
content_type="application/vnd.swiftnav.broker.v1+sbp",
137+
content_type="application/vnd.swiftnav.broker.v1+sbp2",
138138
streaming=True)
139139
with HTTPDriver(device_uid="Swift22", url=BASE_STATION_URI) as driver:
140140
assert driver.connect_read()
@@ -153,16 +153,16 @@ def test_http_test_pass_retry():
153153
msg = MsgPrintDep(text='abcd')
154154
get_responses = [Response(body="first response",
155155
status=500,
156-
content_type="application/vnd.swiftnav.broker.v1+sbp"),
156+
content_type="application/vnd.swiftnav.broker.v1+sbp2"),
157157
Response(body='second and last response',
158158
status=200,
159-
content_type="application/vnd.swiftnav.broker.v1+sbp")]
159+
content_type="application/vnd.swiftnav.broker.v1+sbp2")]
160160
post_responses = [Response(body="",
161161
status=500,
162-
content_type="application/vnd.swiftnav.broker.v1+sbp"),
162+
content_type="application/vnd.swiftnav.broker.v1+sbp2"),
163163
Response(body='',
164164
status=200,
165-
content_type="application/vnd.swiftnav.broker.v1+sbp")]
165+
content_type="application/vnd.swiftnav.broker.v1+sbp2")]
166166
register_uri(GET, BASE_STATION_URI, get_responses)
167167
register_uri(PUT, BASE_STATION_URI, post_responses)
168168
with HTTPDriver(device_uid="Swift22", url=BASE_STATION_URI) as driver:

0 commit comments

Comments
 (0)