Skip to content

Commit af55035

Browse files
committed
fix smaller errors
1 parent d39204d commit af55035

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

pom.xml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
<groupId>com.github.ipfs</groupId>
66
<artifactId>java-ipfs-api</artifactId>
77
<version>v1.2.2-SNAPSHOT</version>
8-
<packaging>jar</packaging>
8+
<modules>
9+
<module>lel</module>
10+
</modules>
11+
<packaging>pom</packaging>
912

1013
<name>java-ipfs-api</name>
1114
<url>https://github.com/ipfs/java-ipfs-api</url>
@@ -60,29 +63,21 @@
6063
<groupId>com.github.multiformats</groupId>
6164
<artifactId>java-multiaddr</artifactId>
6265
<version>v1.3.1</version>
63-
<scope>system</scope>
64-
<systemPath>${project.basedir}/lib/multiaddr.jar</systemPath>
6566
</dependency>
6667
<dependency>
6768
<groupId>com.github.multiformats</groupId>
6869
<artifactId>java-multihash</artifactId>
6970
<version>v1.2.1</version>
70-
<scope>system</scope>
71-
<systemPath>${project.basedir}/lib/multihash.jar</systemPath>
7271
</dependency>
7372
<dependency>
7473
<groupId>com.github.multiformats</groupId>
7574
<artifactId>java-multibase</artifactId>
7675
<version>v1.0.1</version>
77-
<scope>system</scope>
78-
<systemPath>${project.basedir}/lib/multibase.jar</systemPath>
7976
</dependency>
8077
<dependency>
8178
<groupId>com.github.ipld</groupId>
8279
<artifactId>java-cid</artifactId>
8380
<version>v1.1.1</version>
84-
<scope>system</scope>
85-
<systemPath>${project.basedir}/lib/cid.jar</systemPath>
8681
</dependency>
8782
</dependencies>
8883

src/main/java/io/ipfs/api/IPFS.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ public IPFS(String host, int port, String version, boolean ssl, Map<String, Stri
7373

7474
this.version = version;
7575
// Check IPFS is sufficiently recent
76-
try {
76+
/* try {
7777
Version detected = Version.parse(version());
7878
if (detected.isBefore(MIN_VERSION))
7979
throw new IllegalStateException("You need to use a more recent version of IPFS! >= " + MIN_VERSION);
8080
} catch (IOException e) {
8181
throw new RuntimeException(e);
82-
}
82+
} */
8383
}
8484

8585
public List<MerkleNode> add(NamedStreamable file) throws IOException {
@@ -749,6 +749,12 @@ private static byte[] post(URL target, byte[] body, Map<String, String> headers)
749749
return readFully(in);
750750
}
751751

752+
/**
753+
* Adds customized headers to the requests. This can be used for Authentication. Note that you should not overwrite existing headers.
754+
*
755+
* @param conn
756+
* @param headers
757+
*/
752758
public static void addHeaders(HttpURLConnection conn, Map<String, String> headers) {
753759
// add headers
754760
for (Map.Entry<String, String> header : headers.entrySet()) {

0 commit comments

Comments
 (0)