Code Monkey home page Code Monkey logo

Comments (3)

tiborsimko avatar tiborsimko commented on July 22, 2024 1

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:

  1. Let's verify strictly that HTTP protocol means HTTP server, and HTTPS protocol means HTTPS server, and always raise errors for HTTP/HTTPS mixtures.

  2. Let's remove https protocol from options, keeping only http or xrootd, 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.

tiborsimko avatar tiborsimko commented on July 22, 2024

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.

ParthS007 avatar ParthS007 commented on July 22, 2024

I fixed it in #89 itself.

from cernopendata-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.