Hi.
That doesn't fix it, the mentioned exception is not thrown from the
methods called, those try statements are redundant.
(When reporting exceptions it's better to include the whole stacktrace,
should be in the output/log).
Since you are setting the Authorization header to all requests sent by
ZAP some server is probably not happy with it (e.g. check for updates
requests).
You should just set the header to the required requests.
Best regards.
On 10/09/2022 10:50,
sonawan...@gmail.com wrote:
> Hello
> i fixed this - --- sharing if anyone needs it (added Try Except block
> solved my problem)
>
> my HTTPSender script is
>
> *def sendingRequest(msg, initiator, helper):*
>
> *try:*token = ScriptVars.getGlobalVar("bearer-token")
> msg.getRequestHeader().setHeader('Authorization', 'Bearer ' + token)
> except:
> return msg;
>
> *def responseReceived(msg, initiator, helper):*
>
> *try:* print("Response Size = ",
> msg.getRequestHeader(). getStatusCode ())
> *except:*
> return msg;
>
>
>
>
>
> On Friday, September 9, 2022 at 4:30:29 PM UTC+5:30
sonawan...@gmail.com
> wrote:
>
>> Hello
>>
>> My HTTPSender script (jython) is getting disabled with this error
>>
>>
>> * in sendingRequestIOError: java.nio.channels.ClosedChannelException*