Skip to content
Browse files

fix

  • Loading branch information...
1 parent 5b6a65f commit f83a346ef98dbbc8e5ce7c0212e58b0e07be9918 @michelegonella committed Sep 19, 2012
View
2 zen-webservice/src/main/java/com/nominanuda/hyperapi/AbstractEntityDecoder.java
@@ -25,7 +25,7 @@
import com.nominanuda.web.http.HttpProtocol;
public abstract class AbstractEntityDecoder<T> implements EntityDecoder, HttpProtocol {
- protected static final String ANY_CONTENT_TYPE = "*";
+ public static final String ANY_CONTENT_TYPE = "*";
private final Class<T> cl;
protected final String contentType;
View
4 zen-webservice/src/main/java/com/nominanuda/hyperapi/EntityCodec.java
@@ -34,7 +34,9 @@
//(EntityDecoder)new DataStructJsonDecoder(),
(EntityDecoder)new JsonAnyValueDecoder(),
(EntityDecoder)new ByteArrayEntityDecoder(),
- (EntityDecoder)new InputStreamEntityDecoder());
+ (EntityDecoder)new InputStreamEntityDecoder(),
+ (EntityDecoder)new JsonAnyValueDecoder(AbstractEntityDecoder.ANY_CONTENT_TYPE)//this is for buggy server compat
+ );
public static EntityCodec createBasic() {
return new EntityCodec();
View
6 zen-webservice/src/main/java/com/nominanuda/hyperapi/JsonAnyValueDecoder.java
@@ -29,7 +29,11 @@
public class JsonAnyValueDecoder extends AbstractEntityDecoder<Object> {
public JsonAnyValueDecoder() {
- super(Object.class, CT_APPLICATION_JSON);
+ this(CT_APPLICATION_JSON);
+ }
+
+ public JsonAnyValueDecoder(String contentType) {
+ super(Object.class, contentType);
}
@Override

0 comments on commit f83a346

Please sign in to comment.
Something went wrong with that request. Please try again.