diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-28 15:41:19 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-28 15:41:19 +0200 |
commit | 8bb5261cef1a4079aad422aa8cf1c9aa9b895a1a (patch) | |
tree | 9e91fa80b897efc5b3b25c4ce1035436c49d5822 /lib/Plugins | |
parent | 50df456474e6efb0a0915c3808416768f40ec957 (diff) | |
download | abrt-8bb5261cef1a4079aad422aa8cf1c9aa9b895a1a.tar.gz abrt-8bb5261cef1a4079aad422aa8cf1c9aa9b895a1a.tar.xz abrt-8bb5261cef1a4079aad422aa8cf1c9aa9b895a1a.zip |
take file upload POST code from gavin's lib. Adapt rhfastcheck to use changed API
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib/Plugins')
-rw-r--r-- | lib/Plugins/rhticket.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Plugins/rhticket.cpp b/lib/Plugins/rhticket.cpp index ab364c26..d0a72735 100644 --- a/lib/Plugins/rhticket.cpp +++ b/lib/Plugins/rhticket.cpp @@ -136,22 +136,22 @@ string CReporterRHticket::Report(const map_crash_data_t& pCrashData, free(xml_description); string url = concat_path_file(m_sStrataURL.c_str(), "cases"); - curl_post_state *state = new_curl_post_state(0 - + ABRT_CURL_POST_WANT_HEADERS - + ABRT_CURL_POST_WANT_ERROR_MSG); - int http_resp_code = curl_post(state, url.c_str(), postdata.c_str()); + abrt_post_state *state = new_abrt_post_state(0 + + ABRT_POST_WANT_HEADERS + + ABRT_POST_WANT_ERROR_MSG); + int http_resp_code = abrt_post_string(state, url.c_str(), "application/xml", postdata.c_str()); if (http_resp_code / 100 != 2) { /* not 2xx */ string errmsg = state->curl_error_msg ? state->curl_error_msg : "(none)"; - free_curl_post_state(state); + free_abrt_post_state(state); throw CABRTException(EXCEP_PLUGIN, _("server returned HTTP code %u, error message: %s"), http_resp_code, errmsg.c_str()); } - string result = find_header_in_curl_post_state(state, "Location:") ? : ""; - free_curl_post_state(state); + string result = find_header_in_abrt_post_state(state, "Location:") ? : ""; + free_abrt_post_state(state); return result; } |