diff options
| author | Denys Vlasenko <dvlasenk@redhat.com> | 2010-08-24 13:08:52 +0200 |
|---|---|---|
| committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-08-24 13:08:52 +0200 |
| commit | 8ea8b95984058f6469bf813746f1d7472300aa4d (patch) | |
| tree | f2e0cc13f29801887f7608bc9124a8c58ab2f737 /lib/utils/abrt_curl.cpp | |
| parent | 5cc439c2c24859accf8a94d8a91879ad6d967ea4 (diff) | |
| download | abrt-8ea8b95984058f6469bf813746f1d7472300aa4d.tar.gz abrt-8ea8b95984058f6469bf813746f1d7472300aa4d.tar.xz abrt-8ea8b95984058f6469bf813746f1d7472300aa4d.zip | |
fix 305 redirect problem
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'lib/utils/abrt_curl.cpp')
| -rw-r--r-- | lib/utils/abrt_curl.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/utils/abrt_curl.cpp b/lib/utils/abrt_curl.cpp index 52688ac1..a836f704 100644 --- a/lib/utils/abrt_curl.cpp +++ b/lib/utils/abrt_curl.cpp @@ -303,6 +303,11 @@ abrt_post(abrt_post_state_t *state, xcurl_easy_setopt_ptr(handle, CURLOPT_HTTPHEADER, httpheader_list); } +// Disabled: was observed to also handle "305 Use proxy" redirect, +// apparently with POST->GET remapping - which server didn't like at all. +// Attempted to suppress remapping on 305 using CURLOPT_POSTREDIR of -1, +// but it still did not work. +#if 0 // Please handle 301/302 redirects for me xcurl_easy_setopt_long(handle, CURLOPT_FOLLOWLOCATION, 1); xcurl_easy_setopt_long(handle, CURLOPT_MAXREDIRS, 10); @@ -315,7 +320,8 @@ abrt_post(abrt_post_state_t *state, // The non-RFC behaviour is ubiquitous in web browsers, so the library // does the conversion by default to maintain consistency. // However, a server may require a POST to remain a POST. - //xcurl_easy_setopt_long(CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL); + xcurl_easy_setopt_long(handle, CURLOPT_POSTREDIR, -1L /*CURL_REDIR_POST_ALL*/ ); +#endif // Prepare for saving information if (state->flags & ABRT_POST_WANT_HEADERS) |
