You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wink.apache.org by "Andrew Berezovskyi (JIRA)" <ji...@apache.org> on 2016/11/08 14:08:58 UTC
[jira] [Commented] (WINK-425) NullPointerException in
getContentLengthValue (HeadMethodHandler.java:100)
[ https://issues.apache.org/jira/browse/WINK-425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15647655#comment-15647655 ]
Andrew Berezovskyi commented on WINK-425:
-----------------------------------------
Did you want to return 405 Method Not Allowed?
https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6
> NullPointerException in getContentLengthValue (HeadMethodHandler.java:100)
> --------------------------------------------------------------------------
>
> Key: WINK-425
> URL: https://issues.apache.org/jira/browse/WINK-425
> Project: Wink
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.4
> Environment: Ubuntu 14.04 LTS, Apache 2.4.7, Tomcat 7, Wink 1.4
> Reporter: Slawomir Lisznianski
>
> 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:
> {code:java}
> HeadMethodHandler.java:100:
> getContentLengthValue() {
> return countingStream.getByteCount();
> }
> {code}
> One should not be required to handle HEAD requests only to avoid this bug from being exposed.
> {code:xml}
> 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)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)