aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/curl/lib/rtsp.c
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.ru>2022-04-23 01:34:18 +0300
committerrobot-contrib <robot-contrib@yandex-team.ru>2022-04-23 01:34:18 +0300
commit70d823f7ee62199b67f5fbe469005124ffe1fe93 (patch)
tree82277ba9117d43c5a5f973825b38a2ffe7d95818 /contrib/libs/curl/lib/rtsp.c
parent19b525690e0c7788c39d741ea94023b64ae31a89 (diff)
downloadydb-70d823f7ee62199b67f5fbe469005124ffe1fe93.tar.gz
Update contrib/libs/curl to 7.82.0
ref:0a102f02466c720a2ee37f41ed197348e7b727bd
Diffstat (limited to 'contrib/libs/curl/lib/rtsp.c')
-rw-r--r--contrib/libs/curl/lib/rtsp.c39
1 files changed, 21 insertions, 18 deletions
diff --git a/contrib/libs/curl/lib/rtsp.c b/contrib/libs/curl/lib/rtsp.c
index 30fefb9b82..f16e87c12d 100644
--- a/contrib/libs/curl/lib/rtsp.c
+++ b/contrib/libs/curl/lib/rtsp.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -340,7 +340,7 @@ static CURLcode rtsp_do(struct Curl_easy *data, bool *done)
}
/* Transport Header for SETUP requests */
- p_transport = Curl_checkheaders(data, "Transport");
+ p_transport = Curl_checkheaders(data, STRCONST("Transport"));
if(rtspreq == RTSPREQ_SETUP && !p_transport) {
/* New Transport: setting? */
if(data->set.str[STRING_RTSP_TRANSPORT]) {
@@ -364,11 +364,11 @@ static CURLcode rtsp_do(struct Curl_easy *data, bool *done)
/* Accept Headers for DESCRIBE requests */
if(rtspreq == RTSPREQ_DESCRIBE) {
/* Accept Header */
- p_accept = Curl_checkheaders(data, "Accept")?
+ p_accept = Curl_checkheaders(data, STRCONST("Accept"))?
NULL:"Accept: application/sdp\r\n";
/* Accept-Encoding header */
- if(!Curl_checkheaders(data, "Accept-Encoding") &&
+ if(!Curl_checkheaders(data, STRCONST("Accept-Encoding")) &&
data->set.str[STRING_ENCODING]) {
Curl_safefree(data->state.aptr.accept_encoding);
data->state.aptr.accept_encoding =
@@ -385,11 +385,12 @@ static CURLcode rtsp_do(struct Curl_easy *data, bool *done)
it might have been used in the proxy connect, but if we have got a header
with the user-agent string specified, we erase the previously made string
here. */
- if(Curl_checkheaders(data, "User-Agent") && data->state.aptr.uagent) {
+ if(Curl_checkheaders(data, STRCONST("User-Agent")) &&
+ data->state.aptr.uagent) {
Curl_safefree(data->state.aptr.uagent);
data->state.aptr.uagent = NULL;
}
- else if(!Curl_checkheaders(data, "User-Agent") &&
+ else if(!Curl_checkheaders(data, STRCONST("User-Agent")) &&
data->set.str[STRING_USERAGENT]) {
p_uagent = data->state.aptr.uagent;
}
@@ -405,7 +406,7 @@ static CURLcode rtsp_do(struct Curl_easy *data, bool *done)
/* Referrer */
Curl_safefree(data->state.aptr.ref);
- if(data->state.referer && !Curl_checkheaders(data, "Referer"))
+ if(data->state.referer && !Curl_checkheaders(data, STRCONST("Referer")))
data->state.aptr.ref = aprintf("Referer: %s\r\n", data->state.referer);
else
data->state.aptr.ref = NULL;
@@ -422,7 +423,7 @@ static CURLcode rtsp_do(struct Curl_easy *data, bool *done)
(rtspreq & (RTSPREQ_PLAY | RTSPREQ_PAUSE | RTSPREQ_RECORD))) {
/* Check to see if there is a range set in the custom headers */
- if(!Curl_checkheaders(data, "Range") && data->state.range) {
+ if(!Curl_checkheaders(data, STRCONST("Range")) && data->state.range) {
Curl_safefree(data->state.aptr.rangeline);
data->state.aptr.rangeline = aprintf("Range: %s\r\n", data->state.range);
p_range = data->state.aptr.rangeline;
@@ -432,11 +433,11 @@ static CURLcode rtsp_do(struct Curl_easy *data, bool *done)
/*
* Sanity check the custom headers
*/
- if(Curl_checkheaders(data, "CSeq")) {
+ if(Curl_checkheaders(data, STRCONST("CSeq"))) {
failf(data, "CSeq cannot be set as a custom header.");
return CURLE_RTSP_CSEQ_ERROR;
}
- if(Curl_checkheaders(data, "Session")) {
+ if(Curl_checkheaders(data, STRCONST("Session"))) {
failf(data, "Session ID cannot be set as a custom header.");
return CURLE_BAD_FUNCTION_ARGUMENT;
}
@@ -523,7 +524,7 @@ static CURLcode rtsp_do(struct Curl_easy *data, bool *done)
if(putsize > 0 || postsize > 0) {
/* As stated in the http comments, it is probably not wise to
* actually set a custom Content-Length in the headers */
- if(!Curl_checkheaders(data, "Content-Length")) {
+ if(!Curl_checkheaders(data, STRCONST("Content-Length"))) {
result =
Curl_dyn_addf(&req_buffer,
"Content-Length: %" CURL_FORMAT_CURL_OFF_T"\r\n",
@@ -534,18 +535,20 @@ static CURLcode rtsp_do(struct Curl_easy *data, bool *done)
if(rtspreq == RTSPREQ_SET_PARAMETER ||
rtspreq == RTSPREQ_GET_PARAMETER) {
- if(!Curl_checkheaders(data, "Content-Type")) {
- result = Curl_dyn_addf(&req_buffer,
- "Content-Type: text/parameters\r\n");
+ if(!Curl_checkheaders(data, STRCONST("Content-Type"))) {
+ result = Curl_dyn_addn(&req_buffer,
+ STRCONST("Content-Type: "
+ "text/parameters\r\n"));
if(result)
return result;
}
}
if(rtspreq == RTSPREQ_ANNOUNCE) {
- if(!Curl_checkheaders(data, "Content-Type")) {
- result = Curl_dyn_addf(&req_buffer,
- "Content-Type: application/sdp\r\n");
+ if(!Curl_checkheaders(data, STRCONST("Content-Type"))) {
+ result = Curl_dyn_addn(&req_buffer,
+ STRCONST("Content-Type: "
+ "application/sdp\r\n"));
if(result)
return result;
}
@@ -563,7 +566,7 @@ static CURLcode rtsp_do(struct Curl_easy *data, bool *done)
/* RTSP never allows chunked transfer */
data->req.forbidchunk = TRUE;
/* Finish the request buffer */
- result = Curl_dyn_add(&req_buffer, "\r\n");
+ result = Curl_dyn_addn(&req_buffer, STRCONST("\r\n"));
if(result)
return result;