Added simple loop to output HTTP headers