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

RenderedResource try to convert , even acceptedMimeType is */*;q=0.8 #412

Closed
lmtoo opened this issue Nov 12, 2020 · 2 comments
Closed

RenderedResource try to convert , even acceptedMimeType is */*;q=0.8 #412

lmtoo opened this issue Nov 12, 2020 · 2 comments

Comments

@lmtoo
Copy link

lmtoo commented Nov 12, 2020

I have defined a Pdf2TextRenditionProvider ,which implements RenditionProvider , which consume application/pdf and produce text/plain, but when I use pdf-js to preview pdf , pdf-js send a Accept: / request, to access pdf content, which lead to invoke Pdf2TextRenditionProvider'convert method, and response with a 0 length file.

RenditionService shuold not convert when toMimeType is a not a specific mimeType

@paulcwarren
Copy link
Owner

Hi @lmtoo, just to confirm pdf-js sends a request with a header Accept: */*; i.e. it will accept anything?

@lmtoo
Copy link
Author

lmtoo commented Nov 12, 2020

yes, Accept: */* means client can process anything , if we response original mimeType ,it can process too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants