Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
WS4D
jCoAP
Commits
7188f123
Commit
7188f123
authored
Nov 23, 2017
by
Björn Butzin
Browse files
reverted httpasyncclient dependency to version 4.0-beta3 and updated proxy mapper to fix issue #3)
parent
fb29fea6
Changes
3
Hide whitespace changes
Inline
Side-by-side
ws4d-jcoap-applications/pom.xml
View file @
7188f123
...
...
@@ -3,7 +3,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
org.ws4d.jcoap
</groupId>
<artifactId>
jcoap-proxy
</artifactId>
<version>
0.0.
1
</version>
<version>
0.0.
2
</version>
<name>
jCoAP Proxy
</name>
<build>
<sourceDirectory>
src
</sourceDirectory>
...
...
@@ -67,17 +67,17 @@
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<artifactId>
httpasyncclient
</artifactId>
<version>
4.
1.2
</version>
<version>
4.
0-beta3
</version>
</dependency>
<dependency>
<groupId>
commons-cli
</groupId>
<artifactId>
commons-cli
</artifactId>
<version>
1.
3
</version>
<version>
1.
4
</version>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-core
</artifactId>
<version>
2.
6.2
</version>
<version>
2.
10.0
</version>
</dependency>
<dependency>
<groupId>
org.ws4d.jcoap
</groupId>
...
...
@@ -87,7 +87,7 @@
<dependency>
<groupId>
net.sf.ehcache
</groupId>
<artifactId>
ehcache
</artifactId>
<version>
2.10.
2.2.21
</version>
<version>
2.10.
4
</version>
</dependency>
</dependencies>
<url>
https://gitlab.amd.e-technik.uni-rostock.de/ws4d/jcoap
</url>
...
...
ws4d-jcoap-applications/src/org/ws4d/coap/proxy/ModifiedAsyncNHttpServiceHandler.java
View file @
7188f123
...
...
@@ -91,10 +91,8 @@ import org.apache.http.util.EncodingUtils;
* @see ConsumingNHttpEntity
* @see ProducingNHttpEntity
*
* @since 4.0
*/
/**
* @since 4.0
*
* @author Christian Lerche <christian.lerche@uni-rostock.de>
* @author Andy Seidel <andy.seidel@uni-rostock.de>
*/
...
...
ws4d-jcoap-applications/src/org/ws4d/coap/proxy/ProxyMapper.java
View file @
7188f123
...
...
@@ -422,30 +422,29 @@ public class ProxyMapper {
CoapRequest
request
=
context
.
getInCoapRequest
();
CoapRequestCode
code
=
request
.
getRequestCode
();
// TODO:translate header options from coap-request to http-request
NStringEntity
entity
;
entity
=
new
NStringEntity
(
new
String
(
request
.
getPayload
()));
NStringEntity
entity
=
null
;
//
entity = new NStringEntity(new String(request.getPayload()));
switch
(
code
)
{
case
GET:
httpRequest
=
new
HttpGet
(
context
.
getUri
().
toString
());
break
;
case
PUT:
httpRequest
=
new
HttpPut
(
context
.
getUri
().
toString
());
entity
=
new
NStringEntity
(
new
String
(
request
.
getPayload
()));
((
HttpPut
)
httpRequest
).
setEntity
(
entity
);
break
;
case
POST:
httpRequest
=
new
HttpPost
(
context
.
getUri
().
toString
());
entity
=
new
NStringEntity
(
new
String
(
request
.
getPayload
()));
((
HttpPost
)
httpRequest
).
setEntity
(
entity
);
break
;
case
DELETE:
httpRequest
=
new
HttpDelete
(
context
.
getUri
().
toString
());
break
;
default
:
entity
.
close
();
throw
new
IllegalStateException
(
"unknown request code"
);
}
context
.
setOutHttpRequest
(
httpRequest
);
entity
.
close
();
}
public
static
void
transResponseCoapToCoap
(
ProxyMessageContext
context
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment