1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-02-14 18:10:05 +00:00

Fix incorrect null check

This was causing NPEs when no headers were specified and one was
attempting to POST data.
This commit is contained in:
SquidDev 2017-07-17 22:46:48 +01:00
parent 94d701b1f7
commit 505ccf97cf

View File

@ -143,7 +143,7 @@ public class HTTPRequest implements HTTPTask.IHTTPTask
connection.setRequestProperty( "content-type", "application/x-www-form-urlencoded; charset=utf-8" );
connection.setRequestProperty( "content-encoding", "UTF-8" );
}
if( m_postText != null )
if( m_headers != null )
{
for( Map.Entry<String, String> header : m_headers.entrySet() )
{