Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Yann Leboulanger
gajim-plugins
Commits
3721db17
Commit
3721db17
authored
Apr 15, 2017
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[url_image_preview] Add support for aesgcm://
parent
e8b6b329
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
url_image_preview/url_image_preview.py
url_image_preview/url_image_preview.py
+3
-1
No files found.
url_image_preview/url_image_preview.py
View file @
3721db17
...
...
@@ -164,7 +164,7 @@ class Base(object):
special_text
=
'ftp://'
+
special_text
urlparts
=
urlparse
(
special_text
)
if
urlparts
.
scheme
not
in
[
"https"
,
"http"
,
"ftp"
,
"ftps"
]
or
\
if
urlparts
.
scheme
not
in
[
"https"
,
"http"
,
"ftp"
,
"ftps"
,
'aesgcm'
]
or
\
not
urlparts
.
netloc
:
log
.
info
(
"Not accepting URL for image preview: %s"
%
special_text
)
return
...
...
@@ -237,6 +237,8 @@ class Base(object):
# First get the http head request
# which does not fetch data, just headers
# then check the mime type and filesize
if
urlparts
.
scheme
==
'aesgcm'
:
special_text
=
'https://'
+
special_text
[
9
:]
gajim
.
thread_interface
(
get_http_head
,
[
self
.
textview
.
account
,
special_text
],
self
.
_check_mime_size
,
[
special_text
,
repl_start
,
repl_end
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment