Commit ce749126 authored by mikeytown2's avatar mikeytown2

Issue #1885600 by mikeytown2: fix various warnings from coder module.

parent 79ebf880
......@@ -553,7 +553,7 @@ function httprl_handle_data(&$options) {
// Build the data-stream for this file.
$data_stream .= '--' . HTTPRL_MULTIPART_BOUNDARY . "\r\n";
$data_stream .= 'Content-Disposition: form-data; name="files[' . $field_name . ']' . $multi_field . '"; filename="' . $filename . "\"\r\n";
$data_stream .= 'Content-Disposition: form-data; name="files[' . $field_name . ']' . $multi_field . '"; filename="' . $filename . "\"\r\n";
$data_stream .= 'Content-Transfer-Encoding: binary' . "\r\n";
$data_stream .= 'Content-Type: ' . $mimetype . "\r\n\r\n";
$data_stream .= file_get_contents($fullpath) . "\r\n";
......@@ -1086,7 +1086,7 @@ function httprl_send_request($results = NULL) {
$stream_write_count--;
}
}
elseif ($result->status == 'Writing To Server.') {
elseif ($result->status == 'Writing to server.') {
$result->error = $t('Function timed out. Write.');
// If stream is not done writing, then remove one from the write count.
if (isset($result->fp)) {
......@@ -1114,7 +1114,7 @@ function httprl_send_request($results = NULL) {
if ($timeout <= 0) {
$result->error = $t('Connection timed out.');
// Stream timed out & the request is not done.
if ($result->status == 'Writing To Server.') {
if ($result->status == 'Writing to server.') {
$result->error .= ' ' . $t('Write.');
// If stream is not done writing, then remove one from the write count.
$stream_write_count--;
......@@ -1320,7 +1320,7 @@ function httprl_send_request($results = NULL) {
$responses[$id]->error = $t('Connection refused by destination. TCP.');
$responses[$id]->code = HTTPRL_CONNECTION_REFUSED;
}
if ($responses[$id]->status == 'Writing To Server.') {
if ($responses[$id]->status == 'Writing to server.') {
$responses[$id]->error = $t('Connection refused by destination. Write.');
$responses[$id]->code = HTTPRL_CONNECTION_REFUSED;
}
......@@ -1340,7 +1340,7 @@ function httprl_send_request($results = NULL) {
foreach ($write as $w) {
$id = array_search($w, $this_run);
// Make sure ID is in the streams & status is for writing.
if ($id === FALSE || empty($responses[$id]->status) || ($responses[$id]->status != 'Connecting.' && $responses[$id]->status != 'Writing To Server.')) {
if ($id === FALSE || empty($responses[$id]->status) || ($responses[$id]->status != 'Connecting.' && $responses[$id]->status != 'Writing to server.')) {
continue;
}
......@@ -1395,9 +1395,9 @@ function httprl_send_request($results = NULL) {
$rw_done = TRUE;
}
else {
// Change status to 'Writing To Server.'
// Change status to 'Writing to server.'
if ($responses[$id]->status = 'Connecting.') {
$responses[$id]->status = 'Writing To Server.';
$responses[$id]->status = 'Writing to server.';
}
// There is more data to write to this socket. Cut what was sent
// across the stream and resend whats left next time in the loop.
......@@ -1425,6 +1425,8 @@ function httprl_send_request($results = NULL) {
*
* @see drupal_http_request()
*
* @todo Send cookies in the redirect request if domain/path match.
*
* @param $result
* An object from httprl_send_request.
*/
......@@ -2089,13 +2091,13 @@ function httprl_reconstruct_redirects(&$result) {
* Output text, close connection, continue processing in the background.
*
* @param $output
* string - Text to output to open connection.
* string - Text to output to open connection.
* @param $wait
* bool - Wait 1 second?
* bool - Wait 1 second?
* @param $content_type
* string - Content type header.
* string - Content type header.
* @param $length
* int - Content length.
* int - Content length.
*
* @return
* Returns TRUE if operation worked, FALSE if it failed.
......@@ -2601,6 +2603,9 @@ function httprl_run_function($function, &$input_args) {
return $data;
}
/**
* Implements hook_boot().
*/
function httprl_boot() {
global $base_root;
$full_url = $base_root . request_uri();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment