Changeset 16759
- Timestamp:
- 07/01/08 12:41:11 (3 months ago)
- Files:
-
- trunk/midcom/midcom.helper.replicator/transporter/http.php (modified) (3 diffs)
- trunk/midcom/org.openpsa.httplib/main.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midcom.helper.replicator/transporter/http.php
r16754 r16759 18 18 var $_password = false; 19 19 var $use_force = false; 20 var $http_timeout = 15; 21 var $http_read_timeout = 30; 22 var $keep_alive = false; 20 23 21 24 function midcom_helper_replicator_transporter_http($subscription) … … 83 86 $this->_client = new org_openpsa_httplib(); 84 87 $client =& $this->_client; 88 $client->http_timeout = $this->http_timeout; 89 $client->http_read_timeout = $this->http_read_timeout; 85 90 $client->basicauth['user'] = $this->_username; 86 91 $client->basicauth['password'] = $this->_password; 92 $headers = array(); 93 if ($this->keep_alive) 94 { 95 $headers['connection'] = 'Keep-Alive'; 96 } 87 97 $post_vars = array 88 98 ( … … 91 101 ); 92 102 debug_push_class(__CLASS__, __FUNCTION__); 93 debug_add('Posting ' . strlen($post_vars['midcom_helper_replicator_import_xml']) . ' bytes to ' . $this->url);103 debug_add('Posting ' . strlen($post_vars['midcom_helper_replicator_import_xml']) . " bytes to {$this->url} (file {$items[$key]})"); 94 104 debug_pop(); 95 105 $response = $client->post($this->url, $post_vars); trunk/midcom/org.openpsa.httplib/main.php
r14381 r16759 23 23 ); 24 24 var $files = array(); 25 var $http_timeout = 15; 26 var $http_read_timeout = 30; 25 27 26 28 /** … … 113 115 require_once('HTTP/Request.php'); 114 116 debug_push_class(__CLASS__, __FUNCTION__); 115 $this->_client =& new HTTP_Request($uri); 117 $params = array 118 ( 119 'timeout' => $this->http_timeout, 120 'readTimeout' => array($this->http_read_timeout, 0), 121 ); 122 $this->_client =& new HTTP_Request($uri, $params); 116 123 $c =& $this->_client; 117 124 $c->setMethod(HTTP_REQUEST_METHOD_POST);
