diff --git a/src/de/usd/cstchef/view/RecipePanel.java b/src/de/usd/cstchef/view/RecipePanel.java index 0b53e1c..58886a7 100644 --- a/src/de/usd/cstchef/view/RecipePanel.java +++ b/src/de/usd/cstchef/view/RecipePanel.java @@ -418,13 +418,20 @@ private byte[] doBake(byte[] input) { if (BurpUtils.inBurp()) { IBurpExtenderCallbacks callbacks = BurpUtils.getInstance().getCallbacks(); IExtensionHelpers helpers = callbacks.getHelpers(); - - IRequestInfo info = helpers.analyzeRequest(result); + + IRequestInfo info; + try { + info = helpers.analyzeRequest(result); + } catch( IllegalArgumentException e ) { + // In this case there is no valid HTTP request and no Content-Length update is requried. + return result; + } + List headers = info.getHeaders(); int offset = info.getBodyOffset(); if( result.length == offset ) { - // In this case there is no body and we do not need to update the content length header + // In this case there is no body and we do not need to update the content length header. return result; }