HTTP Referer causes HTTP/1.1 404 Not Found response
1destiny
Registered Users Posts: 2 Beginner grinner
We have a news page http://www.photonstarlighting.co.uk/news/ that contains images from the RSS feed http://photonstarled.smugmug.com/hack/feed.mg?Type=gallery&Data=16190674_QRbYT&format=rss200.
The images do not show.
When diagnosing the problem with one of the images, I found that the "Referer:" in the HTTP request header was causing a problem for smugmug. I used curl on the command line to diagnose.
This works and comes back with a HTTP/1.1 200 OK response:
This doesn't work and comes back with a HTTP/1.1 404 Not Found response:
I also tested by turning off the Referer header in FireFox by setting "network.http.sendRefererHeader" to 0. You can get to the config page by putting about:config in the address bar.
When I did this the images show ok.
Any ideas anyone?
The images do not show.
When diagnosing the problem with one of the images, I found that the "Referer:" in the HTTP request header was causing a problem for smugmug. I used curl on the command line to diagnose.
This works and comes back with a HTTP/1.1 200 OK response:
curl -v -H "Referer: www.photonstarlighting.co.uk/news" [url]http://photonstarled.smugmug.com/photos/1216026541_ViPhV-Th.jpg[/url]
This doesn't work and comes back with a HTTP/1.1 404 Not Found response:
curl -v -H "Referer: http://www.photonstarlighting.co.uk/news" [url]http://photonstarled.smugmug.com/photos/1216026541_ViPhV-Th.jpg[/url]
I also tested by turning off the Referer header in FireFox by setting "network.http.sendRefererHeader" to 0. You can get to the config page by putting about:config in the address bar.
When I did this the images show ok.
Any ideas anyone?
0
Comments
Cheers,
David
SmugMug API Developer
My Photos
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
External links is disabled, so the 2nd case is being handled correctly...but the 1st case should be being denied as well.
SmugMug API Developer
My Photos
if you add a CNAME to your domain, eg. photos.photonstarlighting.co.uk and add that to your SmugMug account. You will be able to access those images in both cases or turn on 'External Links' for that gallery.
SmugMug API Developer
My Photos
Thanks guys.
I have enabled 'External Links' for that gallery - images are now showing.