Rémi Denis-Courmont
cc129a71d7
Remove old mail address from sources
2019-09-04 22:11:04 +03:00
Rémi Denis-Courmont
e3270f2ae4
objects: merge vlc_object_t and vlc_common_members
...
This should fix historical aliasing issues.
2019-04-14 22:24:33 +03:00
Rémi Denis-Courmont
07b7122857
objects: introduce vlc_object_delete()
...
Objects have one strong reference held by their "owner", and zero or
more weak references generated by vlc_object_hold() et al. This
provides a separate function to remove the strong reference than
vlc_object_release() to remove weak ones.
With this sole change, this is really only an annotation though.
2019-03-06 22:53:24 +02:00
Steve Lhomme
5363279805
remove the $Id$ in the source code
2019-01-17 12:21:18 +01:00
Rémi Denis-Courmont
c212795864
tls: separate client and server types
...
They are manipulated differently. It makes sense to use the same types
for session, but not so much for credentials.
2018-11-18 17:56:52 +02:00
Rémi Denis-Courmont
c87bfccf19
httpd: use vlc_tls_GetPollFD()
2018-11-18 17:56:52 +02:00
Rémi Denis-Courmont
9541414aea
tls: use const struct for callbacks
2018-07-29 12:00:59 +03:00
Steve Lhomme
7b383088e5
httpd: the protocol version is stored as a uint8_t
2018-07-11 15:35:06 +02:00
Steve Lhomme
3f7d31e97b
core: replace hardcoded CLOCK_FREQ fractions/multiples by VLC_TICK macros
2018-07-03 11:23:19 +02:00
Rémi Denis-Courmont
8e1fcb9081
httpd: fix parsing hostname variable
...
The variable is a hostname / address, not an URL.
2018-06-27 19:34:00 +03:00
Hugo Beauzée-Luyssen
80e6e93afa
httpd: Fix leak in case of dubious requet headers
2018-06-27 11:16:56 +02:00
Hugo Beauzée-Luyssen
d087a5f90a
httpd: Fix potential out of bound write
2018-06-27 11:10:45 +02:00
Steve Lhomme
b4dfbc6283
rename mdate() to vlc_tick_now()
...
The lua "mdate" remains the same.
2018-06-22 13:32:10 +02:00
Steve Lhomme
ff56c92a5e
rename mtime_t to vlc_tick_t
...
Keep a copy of vlc_tick_tfor backward compatibility.
2018-06-22 13:19:24 +02:00
Rémi Denis-Courmont
b1bc1d3cda
httpd: use assertion instead of leaking
2018-06-17 23:19:50 +03:00
Rémi Denis-Courmont
f340f5ef40
httpd: handle one error
2018-06-17 21:13:00 +03:00
Rémi Denis-Courmont
29cd3492f0
httpd: use linked list for URLs
2018-06-17 21:13:00 +03:00
Rémi Denis-Courmont
9d5b27f356
httpd: remove constant httpd_client_t.i_ref
...
This was always zero.
2018-06-17 21:13:00 +03:00
Rémi Denis-Courmont
e23ad0176c
httpd: use linked list for clients
2018-06-17 21:13:00 +03:00
Rémi Denis-Courmont
4c3ecdb7cc
httpd: use atomic reference count for hosts
...
And simplify accordingly. The reference count is actually handled under
the httpd.lock global mutex. The atomicity is only because the
reference count doubles as thread death flag.
2018-06-17 21:13:00 +03:00
Rémi Denis-Courmont
719eea4b24
httpd: use linked list for hosts
2018-06-17 21:13:00 +03:00
Steve Lhomme
97df12a609
httpd: turn the hardcoded default timeout into a CLOCK_FREQ based value
...
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2018-05-05 19:04:56 +03:00
Steve Lhomme
333ed248b9
use the proper check for sys/socket.h availability
2018-04-12 13:19:23 +02:00
Rémi Denis-Courmont
c3dea95c4a
Expand VLC_COMMON_MEMBERS
...
This is now a one-liner. Expansion helps readability/high-lighting.
2017-12-11 18:55:12 +02:00
Lyndon Brown
2e65002479
httpd: Remove obsolete enum
...
Un-named enum contains HTTPD_CLIENT_FILE and HTTPD_CLIENT_STREAM,
which became obsolete in 56ee33a212
,
replaced with the b_stream_mode boolean.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-11-24 08:50:54 +01:00
Thomas Guillem
6a593dd451
core: use vlc_alloc helpers
2017-11-12 15:24:19 +02:00
Rémi Denis-Courmont
c711cf7ccf
httpd: simplify/fix connection closing
...
Close the connection if request is HTTP/1.0 or if the connection header
line in the response exists and is "close". This works because close is
the only that ever gets set as response so far; it wouldn't work if any
other token were emitted by the server.
Note: the RTSP server and the Lua art callback do not handle connection
close correctly still.
2017-10-08 18:22:26 +03:00
Rémi Denis-Courmont
2f398c08bf
httpd: handle Connection header on unauthenticated requests
2017-10-08 18:18:19 +03:00
Rémi Denis-Courmont
394c9c90b5
httpd: handle Connection header on unknown requests
2017-10-08 18:18:05 +03:00
Rémi Denis-Courmont
7c0ae26a40
httpd: handle Connection header in OPTIONS requests
2017-10-08 18:17:37 +03:00
Rémi Denis-Courmont
64462809c1
httpd: handle Connection header in "streams"
2017-10-08 18:08:07 +03:00
Rémi Denis-Courmont
292ce626db
httpd: handle Connection header in redirections
2017-10-08 18:07:52 +03:00
Rémi Denis-Courmont
a810001878
httpd: do not blindly echo the Connection header line
...
Only the "close" token should actually be echoed. Other token would be
header line names, and must not be echoed unless we specifically do not
want a proxy to pass it up.
For now, force theclose token if there is an inbound connection header.
This is not optimal as it might close a connection needlessly, but at
least it works correctly.
2017-10-08 17:52:43 +03:00
Rémi Denis-Courmont
399f680f41
httpd: remove dead keep-alive code
...
No code path inserts the keep-alive token in the response.
2017-10-08 17:43:31 +03:00
Rémi Denis-Courmont
bda7da7781
httpd: fix inverted logic ( fixes #18812 )
2017-09-16 01:48:46 +03:00
Rémi Denis-Courmont
2131d5cb94
httpd: missing const
2017-07-23 17:26:43 +03:00
Rémi Denis-Courmont
263faf290c
httpd: simplify poll() handling, fix warning
2017-07-07 21:00:24 +03:00
Dennis Hamester
4c853b5477
Include sys/uio.h where necessary
...
All touched files use struct iovec without making sure sys/uio.h is
included.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2017-03-21 21:46:56 +02:00
Filip Roséen
7464613093
network/httpd: use designated initializers for struct iovec
...
Given that POSIX does not guarantee the order (nor the number) of the
data-members within "struct iovec", we should either use designated
initializers, or direct member-access, to initialize struct iovec.{iov_base,
iov_len}.
--
See the below:
- http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_uio.h.html
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2017-02-26 16:43:06 +02:00
Rémi Denis-Courmont
5e898d9d25
httpd: use vlc_tls_* API also for unencrypted HTTP, simplify
2017-02-26 15:37:52 +02:00
Rémi Denis-Courmont
899f81113f
vlc_tls_ServerSessionCreate() takes a vlc_tls_t
...
This adds transitional vlc_tls_ServerSessionCreateFD() helper for
compatiblity. This is only to maintain sequential builds. The helper
will be removed shortly.
2017-02-26 15:22:46 +02:00
Rémi Denis-Courmont
5cc99219c5
tls: remove tls_Recv() and tls_Send()
2017-02-26 13:09:38 +02:00
Rémi Denis-Courmont
2b9c72c07b
network: Remove httpd_handler_sys_t (refs #17018 )
2017-02-19 22:54:48 +02:00
Francois Cartegnie
7879653874
network: httpd: fix inverted logic in connection reply
...
Connection: (null)
2016-07-20 16:24:54 +02:00
Eric Engestrom
845d986b0d
network: fix spelling mistakes
...
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2016-04-02 18:11:52 +03:00
Rémi Denis-Courmont
32c3a6039c
tls: split server-specific session creation function...
...
...from common code. And document.
2016-01-13 19:16:22 +02:00
Rémi Denis-Courmont
3956c4a698
httpd: simplify client destruction
2016-01-12 22:14:07 +02:00
Steve Lhomme
b8873ae72e
fix odd space character
...
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2015-12-18 11:52:32 +01:00
Rémi Denis-Courmont
dc1b41f114
tls: make session independent of credentials
2015-12-16 19:33:52 +02:00
Rémi Denis-Courmont
1b68edb931
Namespace/rename XML encode/decode functions
2015-11-29 15:13:51 +02:00