Skip to content

Commit 65d3e5e

Browse files
committed
fix: no such method at HttpMethod.HEAD.matches
1 parent 8f962b3 commit 65d3e5e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

arex-instrumentation/servlet/arex-httpservlet/src/main/java/io/arex/inst/httpservlet/ServletAdviceHelper.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
import org.springframework.web.context.request.NativeWebRequest;
2929
import org.springframework.web.context.request.async.DeferredResult;
3030
import org.springframework.web.method.support.InvocableHandlerMethod;
31+
import sun.net.www.http.HttpClient;
32+
33+
import javax.print.DocFlavor;
3134

3235
/**
3336
* ServletAdviceHelper
@@ -210,8 +213,8 @@ private static <TRequest> boolean shouldSkip(ServletAdapter<TRequest, ?> adapter
210213
}
211214

212215
// skip if pre-request http-method is HEAD or OPTIONS
213-
if (HttpMethod.HEAD.matches(adapter.getMethod(httpServletRequest))
214-
|| HttpMethod.OPTIONS.matches(adapter.getMethod(httpServletRequest))) {
216+
if (HttpMethod.HEAD.name().equals(adapter.getMethod(httpServletRequest))
217+
|| HttpMethod.OPTIONS.name().equals(adapter.getMethod(httpServletRequest))) {
215218
return true;
216219
}
217220

0 commit comments

Comments
 (0)