Open bbockelm opened 1 month ago
Some thoughts on this while I'm working on #1393
If the director decides to proxy the PROPFIND
request, it should:
207
(per WebDAV standard)Pelican-X-Namespace
header with collections-url
field
This is how I modify the client code to be upward compatible with this change. The client still expects 307 response as another option and it will take the Location
header as the collections url in that case.@bbockelm any words of wisdom before I commit the changes to #1393 ?
The "connection broker" mode for an origin allows it to be run from behind a firewall and require no host certificate.
However, recent new features have partially broken the mode. I spot two issues:
Suggested fixes:
broker/client.go
, we already have a function that will return a TCP socket connected to the origin based on the origin name and broker address. Add a new method to the director module that returns ahttp.Transport
object which is aware of the origins that need a connection broker. Internally, this new object would implement theDialContext
method. WithinDialContext
, if the requested hostname is that of an origin which needs a connection broker, invoke the connection broker logic to get a newnet.Conn
frombroker.ConnectToOrigin
and return that. Otherwise, perform a "normal" dial to create a TCP socket.GetTransport
in the director to the director-specific logic from step (1).