Skip to content
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

Incorrect library catalog when saving via proxy #88

Open
dstillman opened this issue Jan 18, 2017 · 2 comments
Open

Incorrect library catalog when saving via proxy #88

dstillman opened this issue Jan 18, 2017 · 2 comments

Comments

@dstillman
Copy link
Member

When saving http://link.springer.com/article/10.1007/s11153-004-8034-5 via the GMU proxy, the Library Catalog is populated with link.springer.com.mutex.gmu.edu. Ideally it would be Springer Link, but failing that it should at least be link.springer.com. (The tests show different results, though I'm not sure what accounts for the difference.) It definitely shouldn't include the proxy.

@zuphilip
Copy link

This comes from the EM translator:

newItem.libraryCatalog = doc.location.host;

see https://github.com/zotero/translators/blob/master/Embedded%20Metadata.js#L614 (I am not a big fan of document function because they can easily fail on server environment.)

The other example is different and uses the import translator for RIS data.

@adomasven
Copy link
Member

adomasven commented Jan 18, 2017

Starting Zotero 5.0 and with the new connectors ZU.urlToProxy() and ZU.urlToProper() are available in translators.

On one hand we should avoid relying on additional utility functions if possible and translators in general should be proxy agnostic. Given that EM is used in many other translators, we could address this on the Zotero side of things.

On the other hand, as there are ambitions to make EM the generic translator, maybe EM should become more proxy aware.

Note the signature doWeb(doc, url), where the url argument could be used to accommodate cases like this. At the moment the url field is not unproxied, but that could change (although I am worried it could introduce issues in child translators for resources behind proxies, but my knowledge is limited).

@adomasven adomasven removed their assignment Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants