Comments (3)
Thanks. One thing that remains is what to do when users specify --protocol https
but --server http://...
. The current behaviour is:
$ cernopendata-client get-file-locations --recid 3005 --protocol https --server http://opendata-dev.cern.ch
https://opendata.cern.ch/eos/opendata/cms/configuration-files/2011/0d0714743f0204ed3c0144941e6ce248.configFile.py
$ cernopendata-client get-file-locations --recid 3005 --protocol http --server http://opendata-dev.cern.ch
http://opendata-dev.cern.ch/eos/opendata/cms/configuration-files/2011/0d0714743f0204ed3c0144941e6ce248.configFile.py
$ cernopendata-client get-file-locations --recid 3005 --protocol http --server https://opendata-dev.cern.ch
https://opendata-dev.cern.ch/eos/opendata/cms/configuration-files/2011/0d0714743f0204ed3c0144941e6ce248.configFile.py
That is, even if users force HTTP it is HTTPS which is used.
Two solutions:
-
Let's verify strictly that HTTP protocol means HTTP server, and HTTPS protocol means HTTPS server, and always raise errors for HTTP/HTTPS mixtures.
-
Let's remove
https
protocol from options, keeping onlyhttp
orxrootd
, and let's accept--server http://...
or--server https://...
as valid possibilities, and let's start either HTTP or HTTPS transler based on that.
I think the second option would be more user friendly. We don't really need two separate options to specify this. If users specify the protocol already as part of the server, then we can take that. (Kind of like people write firefox http://example.org
or firefox https://example.org
without worrying about any other command line options.)
from cernopendata-client.
Another trouble with HTTPS protocol:
$ cernopendata-client download-files --recid 3005 --verify --protocol https --server https://opendata-dev.cern.ch
==> ERROR: Invalid value for --server: https://opendata-dev.cern.ch - Server should be a valid HTTP URI
from cernopendata-client.
I fixed it in #89 itself.
from cernopendata-client.
Related Issues (20)
- walker: enrich output with parent directories
- Consistency between top-level CLI notion behind "protocol" and low-level Searcher notion behind "protocol"
- cernopendata-client get-metadata --recid 550 --output-value title
- searcher: JSON Decode error for `--verbose`
- CI: Test on multiple enviornments
- file locations: distinguish between EOSPUBLIC and OPENDATA URIs
- download-files: expose HTTP downloader choice (requests vs pycurl) HOT 1
- download-files: success for 5000, failure for 12341
- installation: xrootd troubles HOT 1
- downloader: CLI breaks when record has no files
- Raise exceptions when using the methods outside the CLI
- Download with docker - where do the files go? HOT 2
- Parallelize Downloads
- cli: add support for multiple filter arguments in the get-metadata command
- Verbose mode in get-file-locations HOT 1
- downloader: partial downloads are marked as success:
- cernopendata-client get-file-locations --recid 282 --protocol xrootd --verbose HOT 1
- searcher: separate out get_list_directory() and friends
- downloader: catch more error situations HOT 4
- downloader: resume interrupted downloads HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cernopendata-client.