Skip to content

Commit

Permalink
[HWKMETRICS-185] Fix the empty payload interceptor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Negrea committed Aug 13, 2015
1 parent 4998f3e commit ac27d9b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import javax.ws.rs.core.Context;
import javax.ws.rs.ext.Provider;

import org.jboss.resteasy.annotations.interception.ServerInterceptor;
import org.jboss.resteasy.core.ResourceMethod;
import org.jboss.resteasy.core.ServerResponse;
import org.jboss.resteasy.spi.Failure;
Expand All @@ -37,6 +38,7 @@
* @author Stefan Negrea
*/
@Provider
@ServerInterceptor
public class EmptyPayloadFilter implements PreProcessInterceptor {
public static final String EMPTY_PAYLOAD = EmptyPayloadFilter.class.getName();

Expand All @@ -48,7 +50,7 @@ public ServerResponse preProcess(HttpRequest request,
ResourceMethod resourceMethod) throws Failure,
WebApplicationException {

if (!HttpMethod.POST.equals(resourceMethod.getMethod())) {
if (!HttpMethod.POST.equals(request.getHttpMethod())) {
return null;
}

Expand Down

0 comments on commit ac27d9b

Please sign in to comment.