Skip to content

Commit

Permalink
delay creation of handler until the MultiPartParser is created
Browse files Browse the repository at this point in the history
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
  • Loading branch information
lachlan-roberts committed Dec 10, 2019
1 parent 1e63c83 commit 9fdd454
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -497,7 +497,6 @@ protected void parse()
_parsed = true;

MultiPartParser parser = null;
Handler handler = new Handler();
try
{
// if its not a multipart request, don't parse it
Expand Down Expand Up @@ -530,7 +529,7 @@ else if ("".equals(_config.getLocation()))
contentTypeBoundary = QuotedStringTokenizer.unquote(value(_contentType.substring(bstart, bend)).trim());
}

parser = new MultiPartParser(handler, contentTypeBoundary);
parser = new MultiPartParser(new Handler(), contentTypeBoundary);
byte[] data = new byte[_bufferSize];
int len;
long total = 0;
Expand Down

0 comments on commit 9fdd454

Please sign in to comment.