Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
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

Updated logic for PDF responses #656

Merged
merged 1 commit into from Dec 27, 2019
Merged

Updated logic for PDF responses #656

merged 1 commit into from Dec 27, 2019

Conversation

@arfon
Copy link
Member

arfon commented Dec 27, 2019

This is an update to the controller logic for handling PDF responses. In the past we redirected PDF urls but it turns out that the Google Scholar webcrawler doesn't like this.

With this change, we download the file server-side and send directly to the browser when requesting a PDF, rather than redirecting.

/ cc #130 #637 @labarba


it "should not redirect when accepting any content type" do
paper = create(:accepted_paper)
request.headers["HTTP_ACCEPT"] = "*/*"

This comment has been minimized.

Copy link
@arfon

arfon Dec 27, 2019

Author Member

This is the content type the Google web crawler specifies.

@arfon arfon temporarily deployed to joss-production Dec 27, 2019 Inactive
@arfon arfon merged commit 454f2e9 into master Dec 27, 2019
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@arfon arfon deleted the content-types branch Dec 27, 2019
arfon added a commit that referenced this pull request Dec 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.