clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r910451 - in /incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs: ./ org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/
Date Tue, 16 Feb 2010 10:04:07 GMT
Author: mir
Date: Tue Feb 16 10:04:07 2010
New Revision: 910451

URL: http://svn.apache.org/viewvc?rev=910451&view=rev
Log:
CLEREZZA-109: closed issue. Merged with trunk

Modified:
    incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/   (props
changed)
    incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/RootResourceExecutorImpl.java
    incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/WebRequestImpl.java

Propchange: incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 16 10:04:07 2010
@@ -1,3 +1,4 @@
+/incubator/clerezza/issues/CLEREZZA-109/org.apache.clerezza.triaxrs:910447-910450
 /incubator/clerezza/issues/CLEREZZA-43/org.apache.clerezza.triaxrs:891792-892499
 /incubator/clerezza/issues/CLEREZZA-48/org.apache.clerezza.triaxrs:893435-898896
 /incubator/clerezza/issues/CLEREZZA-86/org.apache.clerezza.triaxrs:903135-910335

Modified: incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/RootResourceExecutorImpl.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/RootResourceExecutorImpl.java?rev=910451&r1=910450&r2=910451&view=diff
==============================================================================
--- incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/RootResourceExecutorImpl.java
(original)
+++ incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/RootResourceExecutorImpl.java
Tue Feb 16 10:04:07 2010
@@ -333,14 +333,18 @@
 	 * @return
 	 */
 	private Set<MethodAndInputType> filterByConsumedType(Set<Method> methods,
-			WebRequest request) {
+			WebRequest request) throws HandlerException {
 		final String contentTypeString = request.getHeaders().getFirst(
 				HttpHeaders.CONTENT_TYPE);
 		MediaType mediaType;
 		if (contentTypeString != null) {
 			mediaType = MediaType.valueOf(contentTypeString);
 		} else {
-			mediaType = null;
+			if (request.getWrhapiRequest().getMessageBody() != null) {
+				mediaType = MediaType.APPLICATION_OCTET_STREAM_TYPE;
+			} else {
+				mediaType = null;
+			}
 		}
 		Set<MethodAndInputType> result = new HashSet<MethodAndInputType>();
 		METHODS: for (Method method : methods) {

Modified: incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/WebRequestImpl.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/WebRequestImpl.java?rev=910451&r1=910450&r2=910451&view=diff
==============================================================================
--- incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/WebRequestImpl.java
(original)
+++ incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/WebRequestImpl.java
Tue Feb 16 10:04:07 2010
@@ -173,8 +173,7 @@
 			MediaType mediaType;
 			if ((contentTypeHeaders == null)
 					|| (contentTypeHeaders.length == 0)) {
-				mediaType = new MediaType("application",
-						"x-www-form-urlencoded");// MediaType.WILDCARD_TYPE;
+				mediaType = MediaType.APPLICATION_OCTET_STREAM_TYPE;
 			} else {
 				mediaType = MediaType.valueOf(contentTypeHeaders[0]);
 			}



Mime
View raw message