Skip to content

Commit

Permalink
revert some of the changes on adding content type header
Browse files Browse the repository at this point in the history
  • Loading branch information
RufaelDev committed Sep 20, 2023
1 parent 91f03f5 commit 7a565f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions ingest-tools/fmp4ingest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,9 @@ int push_thread(
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);

struct curl_slist* hs = NULL;
hs = curl_slist_append(hs, "Content-Type: application/mp4");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, hs);
//struct curl_slist* hs = NULL;
//hs = curl_slist_append(hs, "Content-Type: application/mp4");
//curl_easy_setopt(curl, CURLOPT_HTTPHEADER, hs);

if (opt.basic_auth_.size())
{
Expand Down Expand Up @@ -367,12 +367,12 @@ int push_thread(
fprintf(stderr, "---- connection with server failed %s\n",
curl_easy_strerror(res));
curl_easy_cleanup(curl);
curl_slist_free_all(hs);
//curl_slist_free_all(hs);
return 1; // nothing todo when connection fails
}
else
{
curl_slist_free_all(hs);
//curl_slist_free_all(hs);
fprintf(stderr, "---- connection with server sucessfull %s\n",
curl_easy_strerror(res));
}
Expand Down Expand Up @@ -552,7 +552,7 @@ int push_thread(
}
/* always cleanup */
curl_easy_cleanup(curl);
curl_slist_free_all(hs);
//curl_slist_free_all(hs);

if (opt.dry_run_)
if (outf.good())
Expand Down
6 changes: 3 additions & 3 deletions ingest-tools/push_markers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ struct PostCurlIngestConnection
curl_easy_setopt(curl, CURLOPT_POST, 1);
curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
struct curl_slist* hs = NULL;
hs = curl_slist_append(hs, "Content-Type: application/mp4");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, hs);
//hs = curl_slist_append(hs, "Content-Type: application/mp4");
//curl_easy_setopt(curl, CURLOPT_HTTPHEADER, hs);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, (char*)&data[0]);
curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)data.size());
CURLcode res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
curl_slist_free_all(hs);
//curl_slist_free_all(hs);
if (res != CURLE_OK)
fprintf(stderr, " CURL HTTP post of segment failed: %s\n",
curl_easy_strerror(res));
Expand Down

0 comments on commit 7a565f4

Please sign in to comment.