Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Disable cache when downloading file#3484

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@ashleytqy
Copy link
Contributor

@ashleytqyashleytqy commentedMar 30, 2018
edited
Loading

Fixes#3251

The route handler (NbconvertFileHandler) that processes a download request did not have cache-control header so this adds the header so ensure that the downloaded pdf / markdown etc. file will always be the most recent (not cached).

@takluyver
Copy link
Member

Was it actually computing the etags wrong, or was it the Cache-Control change that fixed it? Looking through tornado's code, it looks like it computes the etag by hashing the content when we callself.finish(), which I think should work.

@takluyver
Copy link
Member

(I'd assumed before that tornado wasn't setting etags by default except for static files, and that we could try setting it from our code)

@ashleytqy
Copy link
ContributorAuthor

ashleytqy commentedApr 1, 2018
edited
Loading

I think the Cache-Control fixed it – I'll remove thecompute_etag method!

@ashleytqyashleytqy changed the titleDisable etags and cache when downloading fileDisable cache when downloading fileApr 1, 2018
@ashleytqy
Copy link
ContributorAuthor

hi@takluyver ! does this look good to you?

@takluyver
Copy link
Member

Oh, sorry, it dropped off my radar. It does look good, thanks. I assume you've tested that it fixes the issue?

I think we might also need the same in therespond_zip() function; that's used when nbconvert produces multiple files, so we assemble them into a zip file to be downloaded.

@ashleytqy
Copy link
ContributorAuthor

ashleytqy commentedApr 10, 2018
edited
Loading

@takluyver yup! i’ll also add the change torespond_zip() !

@takluyver
Copy link
Member

Thanks :-)

@takluyvertakluyver added this to the5.5 milestoneApr 11, 2018
@takluyvertakluyver merged commitf69ce9f intojupyter:masterApr 11, 2018
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsApr 1, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

5.5

Development

Successfully merging this pull request may close these issues.

"Download As..." Reusing old pdf

3 participants

@ashleytqy@takluyver@ckilcrease

[8]ページ先頭

©2009-2025 Movatter.jp