protected void close() {
		if(!statusSent) status(500); // Internal server error
		if(!headersSent) completeHeaders();
		
		try { 
			connection.shutdownOutput();
			connection.close();
		} catch (IOException e) { e.printStackTrace(); }
	}