Mercurial > audlegacy-plugins
comparison src/curl/curl.c @ 501:1b06f6690022 trunk
[svn] - ssl support (no idea why, but hey, we can!)
author | nenolod |
---|---|
date | Sun, 21 Jan 2007 21:01:41 -0800 |
parents | 1d81ea250dce |
children | f665e3a6dad7 |
comparison
equal
deleted
inserted
replaced
500:1d81ea250dce | 501:1b06f6690022 |
---|---|
488 curl_easy_setopt(handle->curl, CURLOPT_WRITEDATA, handle); | 488 curl_easy_setopt(handle->curl, CURLOPT_WRITEDATA, handle); |
489 curl_easy_setopt(handle->curl, CURLOPT_HEADERDATA, handle); | 489 curl_easy_setopt(handle->curl, CURLOPT_HEADERDATA, handle); |
490 | 490 |
491 curl_easy_setopt(handle->curl, CURLOPT_CONNECTTIMEOUT, 10); | 491 curl_easy_setopt(handle->curl, CURLOPT_CONNECTTIMEOUT, 10); |
492 | 492 |
493 curl_easy_setopt(handle->curl, CURLOPT_SSL_VERIFYPEER, 0); | |
494 curl_easy_setopt(handle->curl, CURLOPT_SSL_VERIFYHOST, 0); | |
495 | |
493 //add header icy-metadata:1 (when we're ready for it) | 496 //add header icy-metadata:1 (when we're ready for it) |
494 { | 497 { |
495 struct curl_slist *hdr = NULL; | 498 struct curl_slist *hdr = NULL; |
496 hdr = curl_slist_append(hdr, "icy-metadata:1"); | 499 hdr = curl_slist_append(hdr, "icy-metadata:1"); |
497 curl_easy_setopt(handle->curl, CURLOPT_HTTPHEADER, hdr); | 500 curl_easy_setopt(handle->curl, CURLOPT_HTTPHEADER, hdr); |
756 curl_vfs_feof_impl, | 759 curl_vfs_feof_impl, |
757 curl_vfs_truncate_impl, | 760 curl_vfs_truncate_impl, |
758 curl_vfs_metadata_impl | 761 curl_vfs_metadata_impl |
759 }; | 762 }; |
760 | 763 |
764 VFSConstructor curl_https_const = { | |
765 "https://", | |
766 curl_vfs_fopen_impl, | |
767 curl_vfs_fclose_impl, | |
768 curl_vfs_fread_impl, | |
769 curl_vfs_fwrite_impl, | |
770 curl_vfs_getc_impl, | |
771 curl_vfs_ungetc_impl, | |
772 curl_vfs_fseek_impl, | |
773 curl_vfs_rewind_impl, | |
774 curl_vfs_ftell_impl, | |
775 curl_vfs_feof_impl, | |
776 curl_vfs_truncate_impl, | |
777 curl_vfs_metadata_impl | |
778 }; | |
779 | |
761 static void init(void) | 780 static void init(void) |
762 { | 781 { |
763 vfs_register_transport(&curl_const); | 782 vfs_register_transport(&curl_const); |
783 vfs_register_transport(&curl_https_const); | |
764 } | 784 } |
765 | 785 |
766 static void cleanup(void) | 786 static void cleanup(void) |
767 { | 787 { |
768 #if 0 | 788 #if 0 |
769 vfs_unregister_transport(&curl_const); | 789 vfs_unregister_transport(&curl_const); |
790 vfs_unregister_transport(&curl_https_const); | |
770 #endif | 791 #endif |
771 } | 792 } |
772 | 793 |
773 LowlevelPlugin llp_curl = { | 794 LowlevelPlugin llp_curl = { |
774 NULL, | 795 NULL, |