HTTP Referer causes HTTP/1.1 404 Not Found response

1destiny1destiny Registered Users Posts: 2 Beginner grinner
edited April 15, 2011 in SmugMug Support
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:
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?

Comments

  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited April 15, 2011
    Looks like a bug, I'll take a look.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited April 15, 2011
    Are external links enabled on the gallery (as perhaps that's why the referrer is being used by Smugmug)?
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited April 15, 2011
    jfriend wrote: »
    Are external links enabled on the gallery (as perhaps that's why the referrer is being used by Smugmug)?

    External links is disabled, so the 2nd case is being handled correctly...but the 1st case should be being denied as well.
    David Parry
    SmugMug API Developer
    My Photos
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited April 15, 2011
    1destiny wrote: »
    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:
    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?

    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.
    David Parry
    SmugMug API Developer
    My Photos
  • 1destiny1destiny Registered Users Posts: 2 Beginner grinner
    edited April 15, 2011
    devbobo wrote: »
    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.

    Thanks guys.

    I have enabled 'External Links' for that gallery - images are now showing.
Sign In or Register to comment.