The old http module Read function would try to read the full amount of
requested data, which would result in a long loading time for some
streams.
Instead return early with the actual amount of data read.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Do not declare *_sys_t typedefs globally in vlc_common.h. Instead,
declare them locally in each module that provides a definition.
This paves the way to move C++ definitions into anonymous namespaces in
order to respect C++ ODR.
The picture_resource_t and sout_stream_id_sys_t typedefs will be handled
separately, since they require specific additional changes.
See #18033
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
This fixes a off-by-one issue in the ICY parser that would happen in the
case the ICY metadata is unquoted. (StreamTitle=test;).
With empty metadata without ; (StreamTitle=) this would lead to a buffer
over-read.
Credit to Filip Roséen who discovered this issue.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
The auth state machine must be reinitialized at every connection.
NOTE: There are still (probably, untested) leaks if HTTP response
contains multiple auth-related header lines with the same name.
When a stream-control receives STREAM_GET_SIZE it is supposed to write
the size to an uint64_t. The previous implementation would treat the
passed pointer as int64_t, effectivelly causing undefined-behavior.
These changes fixes that.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
With seek support (Range, Content-Range, Accept-Ranges) already
removed, virtual hosting (Host) is the only HTTP 1.1 feature still used
here. Dropping HTTP 1.1 allows removing support for chunked transfer
encoding.
The Host header field is still sent as virtual hosting servers need it
and accept it regardless of the HTTP version.
This keystore is used to store credentials on memory if no others keystore is
found or if the user doesn't want to store them permanently. This keystore is
owned by libvlc and is shared with all vlc objects. It's released when the
libvlc instance is released.