+#if HTTP_CURL_VERSION(7,17,1)
+ if ((zoption = http_request_option(request, options, "postredir", IS_BOOL))) {
+# if HTTP_CURL_VERSION(7,19,1)
+ HTTP_CURL_OPT(CURLOPT_POSTREDIR, Z_BVAL_P(zoption) ? 1L : 0L);
+# else
+ HTTP_CURL_OPT(CURLOPT_POST301, Z_BVAL_P(zoption) ? 1L : 0L);
+# endif
+ }
+#endif
+ }
+
+ /* retries, defaults to 0 */
+ if ((zoption = http_request_option(request, options, "retrycount", IS_LONG))) {
+ request->_retry.count = Z_LVAL_P(zoption);
+ if ((zoption = http_request_option(request, options, "retrydelay", IS_DOUBLE))) {
+ request->_retry.delay = Z_DVAL_P(zoption);
+ } else {
+ request->_retry.delay = 0;
+ }
+ } else {
+ request->_retry.count = 0;