IBM / aspera-cli

IBM Aspera CLI
Apache License 2.0
75 stars 17 forks source link

Support HTTP/2 #164

Open dremerten opened 2 weeks ago

dremerten commented 2 weeks ago

Currently ascli uses HTTP/1

HTTP/2

-Binary Protocol: HTTP/2 uses a binary format for data, which is more efficient for computers to parse and reduces overhead.

Reason for the ask is I was running into issues where my AWS Load-Balancer expected HTTP/2

Example: - Getting a 464 response for mis-match

D, [2024-10-15T18:38:14.527587 #31842] DEBUG -- : raise_on_error POST /aspera/faspex/auth/token 🔑
ERROR: Rest: staging.qa.asperatest.net 464
ERROR: Argument: unprocessed values: ["data_23224"]
/usr/local/rvm/gems/ruby-3.1.2/gems/aspera-cli-4.19.0/lib/aspera/rest_error_analyzer.rb:48:in `raise_on_error': staging.qa.asperatest.net 464  (Aspera::RestCallError)
    from /usr/local/rvm/gems/ruby-3.1.2/gems/aspera-cli-4.19.0/lib/aspera/rest.rb:382:in `call'
    from /usr/local/rvm/gems/ruby-3.1.2/gems/aspera-cli-4.19.0/lib/aspera/oauth/base.rb:65:in `create_token_call'
    from /usr/local/rvm/gems/ruby-3.1.2/gems/aspera-cli-4.19.0/lib/aspera/oauth/jwt.rb:49:in `create_token'
    from /usr/local/rvm/gems/ruby-3.1.2/gems/aspera-cli-4.19.0/lib/aspera/oauth/base.rb:144:in `token'
    from /usr/local/rvm/gems/ruby-3.1.2/gems/aspera-cli-4.19.0/lib/aspera/rest.rb:283:in `call'
    from /usr/local/rvm/gems/ruby-3.1.2/gems/aspera-cli-4.19.0/lib/aspera/rest.rb:427:in `create'
    from /usr/local/rvm/gems/ruby-3.1.2/gems/aspera-cli-4.19.0/lib/aspera/cli/plugins/faspex5.rb:489:in `package_action'
    from /usr/local/rvm/gems/ruby-3.1.2/gems/aspera-cli-4.19.0/lib/aspera/cli/plugins/faspex5.rb:735:in `execute_action'
    from /usr/local/rvm/gems/ruby-3.1.2/gems/aspera-cli-4.19.0/lib/aspera/cli/main.rb:300:in `process_command_line'
    from /usr/local/rvm/gems/ruby-3.1.2/gems/aspera-cli-4.19.0/bin/ascli:24:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-3.1.2/bin/ascli:25:in `load'
    from /usr/local/rvm/gems/ruby-3.1.2/bin/ascli:25:in `<main>'
    from /usr/local/rvm/gems/ruby-3.1.2/bin/ruby_executable_hooks:22:in `eval'
    from /usr/local/rvm/gems/ruby-3.1.2/bin/ruby_executable_hooks:22:in `<main>'
Transfer complete
laurent-martin commented 2 weeks ago

Yes, nice to have. but ruby's embedded net-http gem does not support HTTP/2. gem httpx might be a solution.