Reputation: 1400
Can someone please help me understand why a linked clicked in PC browser (in my case FF) works. But when I paste the same URL into a new tab on the same browser I get a different response from the server?
This runs a service at www.htmlpdf.com and converts www.google.de into a pdf and downloads it.
I don't get it, why does the link work from a click but not from a new tab?
The page source confirms the real URL as: < a href="http://www.htmlpdf.com/iframeconvert?url=http://www.google.de&orientation=Portrait&pageSize=A4">
I've tried substituting ampersands with '& a m p ;' (without spaces) but that does not work.
Any ideas?
Upvotes: 1
Views: 980
Reputation: 41
It seems that the service accessible via http://www.htmlpdf.com/iframeconvert?
is checking the REFERER
of the GET
request. In case it there is no REFERER
set, you'll get Unexpected error occurred, unable to convert this URL to PDF
as a response.
Give it a try on this page: http://www.rexswain.com/httpview.html.
Simply put http://www.htmlpdf.com/iframeconvert?url=http://www.google.de&orientation=Portrait&pageSize=A4
as the URL and send the request once with a referer and once without.
Upvotes: 1