Skip to content

Commit a6d62f2

Browse files
committed
Password should not contain empty space
1 parent f5f3b9c commit a6d62f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/databox/sdk/Databox.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private boolean push(String rawData) {
8080
conn.setRequestProperty("Content-Type", "application/json");
8181
conn.setRequestProperty("User-Agent", "databox-java/" + CLIENT_VERSION);
8282
conn.setRequestProperty("Accept", "application/vnd.databox.v" + CLIENT_VERSION.split("\\.")[0] + "+json");
83-
String encodedToken = base64Encode((_token + ": ").getBytes("UTF-8"));
83+
String encodedToken = base64Encode((_token + ":").getBytes("UTF-8"));
8484
conn.setRequestProperty("Authorization", "Basic " + encodedToken);
8585
conn.setDoOutput(true);
8686
conn.setDoInput(true);
@@ -126,7 +126,7 @@ private boolean push(String rawData) {
126126

127127
private HttpURLConnection buildConnection(String method, String path) throws IOException {
128128
HttpURLConnection connection = (HttpURLConnection) (new URL(_host + path)).openConnection();
129-
String encodedToken = base64Encode((_token + ": ").getBytes("UTF-8"));
129+
String encodedToken = base64Encode((_token + ":").getBytes("UTF-8"));
130130
connection.setRequestProperty("Authorization", "Basic " + encodedToken);
131131
connection.setRequestProperty("Content-Type", "application/json");
132132
connection.setRequestProperty("User-Agent", "databox-java/" + CLIENT_VERSION);

0 commit comments

Comments
 (0)