added handling of pdfs and no html with no title tag
tweaked handling of request