Skip to content

HTTP redirects are not followed properly #233

@gianluca-nitti

Description

@gianluca-nitti

Using Hermes as a client with the streamable HTTP transport against a server that returns a 307 Temporary Redirect results in:

** (FunctionClauseError) no function clause matching in URI.new/1                                                                                                                                                  
    (elixir 1.18.4) lib/uri.ex:602: URI.new({"location", "http://127.0.0.1:9000/mcp"})                                                                                                                             
    (hermes_mcp 0.14.1) lib/hermes/http.ex:49: Hermes.HTTP.do_follow_redirect/3                                                                                                                                    
    (hermes_mcp 0.14.1) lib/hermes/transport/streamable_http.ex:272: Hermes.Transport.StreamableHTTP.do_send_http_request/3                                                                                        
    (hermes_mcp 0.14.1) lib/hermes/transport/streamable_http.ex:159: Hermes.Transport.StreamableHTTP.handle_call/3
    (stdlib 5.2.3.2) gen_server.erl:1131: :gen_server.try_handle_call/4                                  
    (stdlib 5.2.3.2) gen_server.erl:1160: :gen_server.handle_msg/6                                       
    (stdlib 5.2.3.2) proc_lib.erl:241: :proc_lib.init_p_do_apply/3                                       

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions