-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Base URI redirection #32
Comments
Nope. That would be a bug! I'll try to get on it today. |
Regis, |
Thanks! I'll be away too for two weeks, but I'll proceed to test as soon as I come back. |
Hi Jon, |
Rob, This is on the development branch now. |
Bug fixed ! Redirection is ok now. Thanks. |
I does seem like the callback would still be useful. I will try to work on it this week, but it may need to wait until the following when I have some airplane time :-) |
Regis, |
Thanks for the callback, it' working fine. It seems that openseadragon is not able to determine the TileSource Implementation it should use, in this case IIIFTileSource... But at this time I don't understand how it determines that. -Regis |
I've got it figured out. I'm going to fork OSD, add an IIIF 1.1 TileSource, and submit a pull request to them. I'll keep you posted! |
Regis, Try this: https://github.com/jpstroop/openseadragon (You'll need to build; follow the instructions in the README). This ''should'' support IIIF 1.1. I'm no javascript hacker, but It's working on my dev machine when I do, e.g.: <body>
<div id="container">
<div id="viewer" class="openseadragon"></div>
</div>
<script>
var osd_config = {
id: "viewer",
prefixUrl: "images/",
preserveViewport: true,
visibilityRatio: 1,
minZoomLevel: 1,
tileSources: []
}
function update_tileSources(data) {
osd_config.tileSources.push(data);
}
$.when (
$.getJSON('http://localhost:5004/01%2F02%2F0001.jp2/info.json?callback=?',
function(data) {
update_tileSources(data);
}
),
$.getJSON('http://localhost:5004/01%2F02%2Fgrey.jp2/info.json?callback=?',
function(data) {
update_tileSources(data);
}
)
).then( function() {
OpenSeadragon(osd_config)
})
</script>
</body> I'd like to wait to send a pull request to the OSD folks until the 1.1 spec is finalized and released. Let me know what you think. |
Great! It works with IIIF1.1 TileSource! I just had to redeploy Loris dev branch to make it works. ** With percent-encoded URI in getJSON : ** With normal slashes in getJSON : http://interne.biblissima-condorcet.fr/loris/01/02/0001.jp2/info.json?callback=jQuery19008382387820522695_1378068073785&_=1378068073786 I tried with another sub-folder in "/usr/local/share/images" and other images but the errors are the same. I don't understand why, given that I have the same environment as you, I suppose (your forked OSD and the latest Loris dev branch). Do you have an idea for that ? You're right about the pull request for OSD, let's wait for a stable IIIF 1.1 spec. Thanks for your help. -Regis |
The one difference between our environments is that you're working behind a production web server (Apache, presumably?) and I'm still just working on the dev server that's built into Werkzeug. Do you have AllowEncodedSlashes set? I just checked my local copies of the repos and everything is in sync w/ github. Unfortunately I'm out of town this week; I'll put it behind Apache next week and see what I see. I suppose it could also be browser specific...which would stink! It hadn't occurred to me before, but I've been working against Chrome the whole time. Might be another thing to check.... |
Yes you're right, Loris is behind Apache on a production server. I have AllowEncodedSlashes set to On in my Virtualhost. It doesn't seem to be a browser specific bug (but I'm not really sure at this time). -Regis |
Regis,
Nothing special as far as I can tell, and it's all working fine. However, I can exactly replicate your problem if I comment out "AllowEncodedSlashes On". Are you sure it's "On", and that no additional comments follow it? |
Hi Jon, AllowEncodedSlashes On WSGIDaemonProcess loris user=loris group=loris processes=10 threads=25 maximum-requests=10000 WSGIScriptAlias /loris /var/www/loris/loris.wsgi WSGIProcessGroup loris I read some forum threads and tried a few things, without success :
There is nothing interesting in Apache error logs (even in debug mode), and nothing in Loris .err files. I can see this in "loris.webapp.out"... : DEBUG: Re-encoded identifier: test%2FT0000009.jp2 I'm not sure if you could be able to help me more than you did before (thank you for that !) and I wonder if it's not a reverse proxy problem (my Apache is running behind and I have no control over it). Do you think it could be the reason? Thx |
Hmm...I wish I were an Apache expert.... At this point, if I were you, I would set up a separate instance of Apache somewhere else and see if you can get it running...at least that will isolate Apache as the problem. Everything in your logs looks the same as mine; it's weird! Keep me posted! |
So I set up a separate instance of Apache and Loris on a local dev server and... it works! Requests with %2F are ok! The config is almost the same as the prod server. The only things that differ are :
I'll keep you posted.
|
Excellent! (that is, at least you've isolated it) |
Regis, In the meantime, though, I'm going to close this issue. |
Hi Jon, -Regis |
Hi Jon,
When I request "http://interne.biblissima-condorcet.fr/loris/T0000009.jp2", it makes a 303 redirect to this URI "http://interne.biblissima-condorcet.fr/T0000009.jp2/info.json", which throws a 404 error (I have "redirect_base_uri=1" in loris.conf). The "/loris" prefix is removed. Is it a normal behaviour ?
Thx
Regis
The text was updated successfully, but these errors were encountered: