openseadragon background request's accept header

154 views Asked by At

in a Linked Data context, I am pointing my openseadragon client to a resource that will respond with a 303 redirection. If OSD's request has a header "Accept: image/*" (with virtually anything for '*'), the redirection will point to a jpeg and everything is fine. This is the way it works in google chrome.

However, in Firefox the request seems somehow to have a header "Accept: */*". At least that's how I am interpreting the output of firefox's developer's tools' network panel. This leads the resource at the end to redirect to a html page which, of course, OSD cannot render as an image.

How could this happen?

The way I embed OSD in my webpage is like this:

var Imageviewer = OpenSeadragon({
    debugMode:              false,
    id:                     "contentDiv",
    prefixUrl:              "resources/img/SeaDragonImages/",
    showNavigator:          true,
    autoHideControls:       false,
    autoResize:             true,
    springStiffness:        10,
    preserveViewport:       true,
//  ajaxHeaders: {'Accept: image/jpeg'},
    tileSources: null          // sources are (re-)loaded when pageNumbers are clicked
});
$(function(){
    $(".pageNo").click(function(event){
        event.preventDefault();
        Imageviewer.open({
            type: 'legacy-image-pyramid',
            levels: [{ url: $(this).attr('href'), <span data-template="app:scaleImg"/> }]
        });
    });
});

Note that if I enable the ajaxHeaders: {'Accept: image/jpeg'}, that is presently commented out, I do get an Accept header but it contains all sorts of text/hmtl; application/xhtml and the like.

0

There are 0 answers