[epiphany] Fix query handling in pdf reader
- From: Jan-Michael Brummer <jbrummer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Fix query handling in pdf reader
- Date: Fri, 10 Jul 2020 16:20:13 +0000 (UTC)
commit f162f980dcce760f02164f04b265f4c85e0acda9
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Fri Jul 10 17:46:25 2020 +0200
Fix query handling in pdf reader
Fixes: https://gitlab.gnome.org/GNOME/epiphany/-/issues/1235
embed/ephy-pdf-handler.c | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
---
diff --git a/embed/ephy-pdf-handler.c b/embed/ephy-pdf-handler.c
index 56ab04a1f..8940a86b7 100644
--- a/embed/ephy-pdf-handler.c
+++ b/embed/ephy-pdf-handler.c
@@ -222,21 +222,8 @@ ephy_pdf_request_start (EphyPdfRequest *request)
g_list_prepend (request->source_handler->outstanding_requests, request);
original_uri = webkit_uri_scheme_request_get_uri (request->scheme_request);
- soup_uri = soup_uri_new (original_uri);
-
- if (!soup_uri) {
- /* Can't assert because user could theoretically input something weird */
- GError *error = g_error_new (WEBKIT_NETWORK_ERROR,
- WEBKIT_NETWORK_ERROR_FAILED,
- _("%s is not a valid URI"),
- original_uri);
- finish_uri_scheme_request (request, NULL, error);
- g_error_free (error);
- return;
- }
-
- modified_uri = soup_uri_get_path (soup_uri);
- g_assert (modified_uri);
+ g_assert (g_str_has_prefix (original_uri, "ephy-pdf:"));
+ modified_uri = original_uri + strlen ("ephy-pdf:");
request->download = ephy_download_new_for_uri_internal (modified_uri);
ephy_download_disable_desktop_notification (request->download);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]