hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Houston (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1544) NPE in formatCooke method while parsing response cookies
Date Fri, 15 Aug 2014 18:43:18 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14098908#comment-14098908
] 

Mike Houston commented on HTTPCLIENT-1544:
------------------------------------------

Temporary workaround for my use case is to disable cookies using
{code}
RequestConifg config;
...
config.setCookieSpec(CookieSpecs.IGNORE_COOKIES)
{code}

> NPE in formatCooke method while parsing response cookies
> --------------------------------------------------------
>
>                 Key: HTTPCLIENT-1544
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1544
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.3.5
>         Environment: Java 8, OS X
>            Reporter: Mike Houston
>
> Null pointer exception if value of cookie is null during log formatting:
> {code}
> <line ResponseProcessCookies:139>
> String v = cookie.getValue();
>         if (v.length() > 100) { // <== NPE
> {code}
> {code}
> java.lang.NullPointerException
> 	at org.apache.http.client.protocol.ResponseProcessCookies.formatCooke(ResponseProcessCookies.java:140)
> 	at org.apache.http.client.protocol.ResponseProcessCookies.processCookies(ResponseProcessCookies.java:117)
> 	at org.apache.http.client.protocol.ResponseProcessCookies.process(ResponseProcessCookies.java:91)
> 	at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:139)
> 	at org.apache.http.impl.nio.client.MainClientExec.responseReceived(MainClientExec.java:306)
> 	at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseReceived(DefaultClientExchangeHandlerImpl.java:148)
> 	at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.responseReceived(HttpAsyncRequestExecutor.java:224)
> 	at org.apache.http.impl.nio.client.LoggingAsyncRequestExecutor.responseReceived(LoggingAsyncRequestExecutor.java:112)
> 	at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:254)
> 	at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:73)
> 	at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:37)
> 	at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:113)
> 	at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:159)
> 	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:338)
> 	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:316)
> 	at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:277)
> 	at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:105)
> 	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:584)
> 	at java.lang.Thread.run(Thread.java:724)
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message