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

Support for HTTPS protocol #55

Closed
osallou opened this issue Aug 10, 2016 · 6 comments
Closed

Support for HTTPS protocol #55

osallou opened this issue Aug 10, 2016 · 6 comments
Assignees
Milestone

Comments

@osallou
Copy link
Contributor

osallou commented Aug 10, 2016

Biomaj should handle https and directhttps protocols

@osallou osallou self-assigned this Aug 10, 2016
@osallou
Copy link
Contributor Author

osallou commented Aug 10, 2016

Following in biomaj/workflow.py should do the job:

...
if protocol == 'http' or protocol == 'https:
    downloader = HTTPDownload(protocol, server, remote_dir, self.bank.config)
if protocol == 'local':
    downloader = LocalDownload(remote_dir)
if protocol == 'directftp':
    downloader = DirectFTPDownload('ftp', server, remote_dir, list_file)
if protocol == 'directhttp':
    downloader = DirectHttpDownload('http', server, remote_dir, list_file)
if protocol == 'directhttps':
    downloader = DirectHttpDownload('https', server, remote_dir, list_file)
...

in bank property files, should use protocol https or directhttps

@osallou
Copy link
Contributor Author

osallou commented Aug 10, 2016

http and directhttp should also handle CURLOPT_FOLLOWLOCATION to follow redirection when possible.

@horkko
Copy link
Contributor

horkko commented Aug 10, 2016

That should be the reason why after code modification and protocol=directhttps or https the problem still remains?

@osallou
Copy link
Contributor Author

osallou commented Aug 10, 2016

nope, managing redirects is only a helper.

After setting direchttps in protocol, and

if protocol == 'directhttps':
    logging.debug('Using directhttps protocol')
    downloader = DirectHttpDownload('https', server, remote_dir, list_file)

in workflow.py, is something downloaded ? (the html file was because you tried to reach http instead of https).

Can you also add the logging message above, just to be sure you reach the correct block ?

@horkko horkko mentioned this issue Aug 10, 2016
@horkko
Copy link
Contributor

horkko commented Aug 10, 2016

Check pull request #56

@osallou osallou added this to the 3.0.20 milestone Aug 10, 2016
@osallou
Copy link
Contributor Author

osallou commented Aug 10, 2016

Add unit tests with https://httpbin.org/

horkko added a commit to horkko/biomaj that referenced this issue Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants