zotero / translation-server

A Node.js-based server to run Zotero translators
Other
122 stars 51 forks source link

Restore cookie sandbox #26

Closed dstillman closed 6 years ago

dstillman commented 6 years ago

First step: make sure we still need it by finding a site where it makes a difference

mvolz commented 6 years ago

Found one!

curl -d 'http://www.bioone.org/doi/abs/10.1642/0004-8038%282005%29122%5B0673%3APROAGP%5D2.0.CO%3B2' -H 'Content-Type: text/plain' http://127.0.0.1:1969/web

returns

[{"key":"XGW6M2GM","version":0,"itemType":"webpage","url":"http://www.bioone.org/doi/abs/10.1642/0004-8038%282005%29122%5B0673%3APROAGP%5D2.0.CO%3B2","title":"An Error Occurred Setting Your User Cookie","accessDate":"2018-08-06T13:38:57Z"}]

mvolz commented 6 years ago

And in translation-server it works fine:

curl -d '{"url":"http://www.bioone.org/doi/abs/10.1642/0004-8038%282005%29122%5B0673%3APROAGP%5D2.0.CO%3B2","sessionid":"abc123"}' --header "Content-Type: application/json" localhost:1969/web

[{"itemType":"journalArticle","creators":[{"firstName":"Nathan H.","lastName":"Rice","creatorType":"author"},{"firstName":"R. M.","lastName":"Zink","creatorType":"author"}],"notes":[],"tags":[],"title":"Phylogenetic relationships of antpitta genera (passeriformes: formicariidae)","date":"April 1, 2005","DOI":"10.1642/0004-8038(2005)122[0673:PROAGP]2.0.CO;2","publicationTitle":"The Auk","journalAbbreviation":"The Auk","pages":"673-683","volume":"122","issue":"2","ISSN":"0004-8038","url":"http://www.bioone.org/doi/abs/10.1642/0004-8038%282005%29122%5B0673%3APROAGP%5D2.0.CO%3B2","abstractNote":"Phylogenetic relationships among the antpitta genera were studied using DNA sequence data from the mitochondrial genome. The clade representing the traditional antpitta genera (Grallaria, Grallaricula, Hylopezus, Myrmothera, and Pittasoma) was found to be paraphyletic, owing to the sister relationship of Pittasoma and Conopophaga. In a previously unreported relationship, Pittasoma was strongly supported as the sister genus to Conopophaga (Conopophagidae). The remaining antpitta genera form a fully resolved and well-supported monophyletic lineage with two major subclades. The first clade consists of the genus Grallaria and supports the subgenera identified by Lowery and O'Neill (1969). The second antpitta clade has Hylopezus as the sister genus to Myrmothera, with Grallaricula as their sister genus. The results here allow for a new interpretation of the morphological characters used in previous studies.","libraryCatalog":"bioone.org (Atypon)","accessDate":"CURRENT_TIMESTAMP","shortTitle":"Phylogenetic relationships of antpitta genera (passeriformes"}]

dstillman commented 6 years ago

Good find! Should be fixed in the latest. (Note that, @adomasven says, BioOne seems to return an empty response some of the time. I couldn't reproduce that in the client, so not sure what's going on there.)