Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: bdfe647faa89cdfb7f6a39e26ac5b08854f183386e0ba1dfbe10be8afa819a89
Ticket: 2d9b31130be2084e206524536978a37c17d2f887
Need Http option to control srvurl in proxied https requests
User & Date: christian.nassau on 2021-04-21 16:59:50
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    I'm trying to access the Microsoft MSGraph API through Tcl's http package, using tls and autoproxy to tunnel through a proxy. The code
    
      package require http 2.9.1
      package require autoproxy
      autoproxy::init
      http::register https 443 [list ::autoproxy::tls_socket]
      set req [http::geturl https://graph.microsoft.com/v1.0/me/messages -headers {Authorization {Bearer ...}}]
    
    ends up sending a HTTP request of the form 
       GET https://graph.microsoft.com/v1.0/me/messages HTTP/1.1
    
    Microsoft does not like this because of the full URI, and answers with 
        "code": "ResourceNotFound",
        "message": "Invalid version: graph.microsoft.com",
    
    It instead expects the request without the full URI: 
       GET /v1.0/me/messages HTTP/1.1
    
    From a quick internet search it seems to me that the inclusion of the full path might be the right choice for plain HTTP proxies. For HTTPS the proxy uses a "CONNECT" call to establish the connection and the full URI is neither needed nor helpful (as this problem shows).
    
    It might be helpful to let the users of the http package control the handling of this proxy/url issue using a new option for the http connection
    
  5. foundin changed to: "2.9.1"
  6. is_private changed to: "0"
  7. login: "christian.nassau"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "3b279cda57135cd36d2c32c66396637342913651"
  10. resolution changed to: "None"
  11. severity changed to: "Critical"
  12. status changed to: "Open"
  13. submitter changed to: "christian.nassau"
  14. subsystem changed to: "81. Bundled Packages"
  15. title changed to:
    Need Http option to control srvurl in proxied https requests
    
  16. type changed to: "Bug"