Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.4
-
None
-
None
-
Ubuntu 14.04 LTS, Apache 2.4.7, Tomcat 7, Wink 1.4
Description
I'd like to reopen bug WINK-357 reported on 11/Jan/12.
A web crawler hitting any of my resources with a HEAD request will cause this error since countingStream is NULL here:
HeadMethodHandler.java:100:
getContentLengthValue() {
return countingStream.getByteCount();
}
One should not be required to handle HEAD requests only to avoid this bug from being exposed.
i2014-08-28 17:19:18:982 [ajp-bio-8009-exec-1] INFO org.apache.wink.server.internal.registry.ResourceRegistry - The system cannot find any method in the ************ class that supports HEAD
. Verify that a method exists.
2014-08-28 17:19:18:987 [ajp-bio-8009-exec-1] INFO org.apache.wink.server.internal.RequestProcessor - The following error occurred during the invocation of the handlers chain: NullPointerException with message 'null' while processing HEAD request sent to https://pushcoin.com/api/v1/guest/fbauths/code
2014-08-28 17:19:18:987 [ajp-bio-8009-exec-1] ERROR com.pushcoin.pws.provider.UnknownExceptionMapper - Error:
java.lang.NullPointerException
at org.apache.wink.server.internal.handlers.HeadMethodHandler$NoBodyResponse.getContentLengthValue(HeadMethodHandler.java:100)
at org.apache.wink.server.internal.handlers.HeadMethodHandler.handleResponse(HeadMethodHandler.java:83)
at org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:26)
at org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:22)