Skip to content

conn->user is wrong for HTTP #6542

Description

@bagder

When a connection is created the conn->user is copied from the transfer struct. This is for connections that have a single user for the duration of the connection. The user name is then associated with that connection.

For HTTP (and RTSP), the user name (and password etc) is done per transfer and not just per connection. As such, using conn->user and conn->passwd in HTTP code is considered wrong.

It still (mostly) works in the code right now because the credentials are used immediately after the creation of or early use of the connection, before it gets the chance to get reassigned by another transfer that can reuse the same connection - potentially multiplexed.

It is probably an error waiting to happen if we change the order of things or if the use of the credentials for a transfer would be delayed if or the order of events would be changed.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions