wink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r819195 - /incubator/wink/trunk/wink-client/src/main/java/org/apache/wink/client/internal/handlers/AbstractConnectionHandler.java
Date Sat, 26 Sep 2009 19:21:40 GMT
Author: bluk
Date: Sat Sep 26 19:21:40 2009
New Revision: 819195

URL: http://svn.apache.org/viewvc?rev=819195&view=rev
Log:
If request has no Content-Type, use application/octet-stream

Modified:
    incubator/wink/trunk/wink-client/src/main/java/org/apache/wink/client/internal/handlers/AbstractConnectionHandler.java

Modified: incubator/wink/trunk/wink-client/src/main/java/org/apache/wink/client/internal/handlers/AbstractConnectionHandler.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-client/src/main/java/org/apache/wink/client/internal/handlers/AbstractConnectionHandler.java?rev=819195&r1=819194&r2=819195&view=diff
==============================================================================
--- incubator/wink/trunk/wink-client/src/main/java/org/apache/wink/client/internal/handlers/AbstractConnectionHandler.java
(original)
+++ incubator/wink/trunk/wink-client/src/main/java/org/apache/wink/client/internal/handlers/AbstractConnectionHandler.java
Sat Sep 26 19:21:40 2009
@@ -86,6 +86,9 @@
                 entity = genericEntity.getEntity();
             }
             String contentType = request.getHeaders().getFirst(HttpHeaders.CONTENT_TYPE);
+            if (contentType == null) {
+                contentType = MediaType.APPLICATION_OCTET_STREAM;
+            }
             MediaType contentMediaType = MediaType.valueOf(contentType);
             MessageBodyWriter writer =
                 providersRegistry.getMessageBodyWriter(type,



Mime
View raw message