0

I'm using simple browser made with Qt WebKit.

On a page (running local rails server) I have a link that opens Pdf Previewer (pdf.js). In this .js script I try to open local (rails) url with path as parameter. Path can be local file path or some public url.

example:

http://localhost/documents/preview_file?path=http%3A%2F%2Fmy-domain.s3.amazonaws.com%2F4533902%2Ftest.pdf%3FAWSAccessKeyId%3DAKIAJWDKNPWPFJYREP6Q%26Expires%3D1480381051%26Signature%3DCqfAmGCm7S5lTpQ7pP0U25BqYpE%253D

In case parameter path is public url rails only redirects to this url.

But problem is, that in this browser I get an error (in console):

GET http://localhost/documents/preview_file?path=http%3A%2F%2Fmy-domain.s3.amazonaws.com%2F4533902%2Ftest.pdf%3FAWSAccessKeyId%3DAKIAJWDKNPWPFJYREP6Q%26Expires%3D1480381051%26Signature%3DCqfAmGCm7S5lTpQ7pP0U25BqYpE%253D Protocol "" is unknown

I get this error only in this QtWebKit browser, Chrome and Firefox open this link without problem.

Any help appreciated

10x

frido
  • 23
  • 5

1 Answers1

0

QtWebKit released with Qt is based on outdated WebKit engine, that does not implement all Web features available in modern browsers. So it is possible that your page is using some of JavaScript features that are not supported.

Please try your page with latest QtWebKit from https://github.com/annulen/webkit/releases/tag/qtwebkit-tp5. It is based on fresh WebKit and may work better with your content. See http://qtwebkit.blogspot.com/2016/08/qtwebkit-im-back.html for more details about what is happening with QtWebKit now.

annulen
  • 41
  • 2