Updated and simplified Net::HTTP hack