Make sure to send the correct image header, even for 0-length file.
Fix #60 - Replace # and ? before calling parse_url()