pajoye                                   Mon, 16 Aug 2010 10:29:01 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=302334

Log:
- WS

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c
    U   php/php-src/trunk/ext/standard/http_fopen_wrapper.c

Modified: php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c      
2010-08-16 09:57:38 UTC (rev 302333)
+++ php/php-src/branches/PHP_5_3/ext/standard/http_fopen_wrapper.c      
2010-08-16 10:29:01 UTC (rev 302334)
@@ -213,7 +213,7 @@
                        char header_line[HTTP_HEADER_BLOCK_SIZE];

                        /* get response header */
-                       while (php_stream_gets(stream, header_line, 
HTTP_HEADER_BLOCK_SIZE-1) != NULL)  {
+                       while (php_stream_gets(stream, header_line, 
HTTP_HEADER_BLOCK_SIZE-1) != NULL) {
                                if (header_line[0] == '\n' ||
                                    header_line[0] == '\r' ||
                                    header_line[0] == '\0') {
@@ -233,7 +233,7 @@
                }
        }

-       if (stream == NULL)
+       if (stream == NULL)
                goto out;

        /* avoid buffering issues while reading header */
@@ -309,7 +309,7 @@
                }

                /* query string */
-               if (resource->query)    {
+               if (resource->query) {
                        strlcat(scratch, "?", scratch_len);
                        strlcat(scratch, resource->query, scratch_len);
                }
@@ -442,7 +442,7 @@
        }

        /* if the user has configured who they are, send a From: line */
-       if (((have_header & HTTP_HEADER_FROM) == 0) && cfg_get_string("from", 
&tmp) == SUCCESS) {
+       if (((have_header & HTTP_HEADER_FROM) == 0) && cfg_get_string("from", 
&tmp) == SUCCESS) {
                if (snprintf(scratch, scratch_len, "From: %s\r\n", tmp) > 0)
                        php_stream_write(stream, scratch, strlen(scratch));
        }
@@ -450,7 +450,7 @@
        /* Send Host: header so name-based virtual hosts work */
        if ((have_header & HTTP_HEADER_HOST) == 0) {
                if ((use_ssl && resource->port != 443 && resource->port != 0) ||
-                       (!use_ssl && resource->port != 80 && resource->port != 
0))      {
+                       (!use_ssl && resource->port != 80 && resource->port != 
0)) {
                        if (snprintf(scratch, scratch_len, "Host: %s:%i\r\n", 
resource->host, resource->port) > 0)
                                php_stream_write(stream, scratch, 
strlen(scratch));
                } else {
@@ -685,7 +685,7 @@
                php_stream_close(stream);
                stream = NULL;

-               if (location[0] != '\0')        {
+               if (location[0] != '\0') {

                        char new_path[HTTP_HEADER_BLOCK_SIZE];
                        char loc_path[HTTP_HEADER_BLOCK_SIZE];
@@ -697,7 +697,7 @@
                                                        strncasecmp(location, 
"ftps://", sizeof("ftps://")-1)))
                        {
                                if (*location != '/') {
-                                       if (*(location+1) != '\0' && 
resource->path) {
+                                       if (*(location+1) != '\0' && 
resource->path) {
                                                char *s = 
strrchr(resource->path, '/');
                                                if (!s) {
                                                        s = resource->path;
@@ -839,7 +839,7 @@
        NULL  /* rmdir */
 };

-PHPAPI php_stream_wrapper php_stream_http_wrapper =    {
+PHPAPI php_stream_wrapper php_stream_http_wrapper = {
        &http_stream_wops,
        NULL,
        1 /* is_url */

Modified: php/php-src/trunk/ext/standard/http_fopen_wrapper.c
===================================================================
--- php/php-src/trunk/ext/standard/http_fopen_wrapper.c 2010-08-16 09:57:38 UTC 
(rev 302333)
+++ php/php-src/trunk/ext/standard/http_fopen_wrapper.c 2010-08-16 10:29:01 UTC 
(rev 302334)
@@ -213,7 +213,7 @@
                        char header_line[HTTP_HEADER_BLOCK_SIZE];

                        /* get response header */
-                       while (php_stream_gets(stream, header_line, 
HTTP_HEADER_BLOCK_SIZE-1) != NULL)  {
+                       while (php_stream_gets(stream, header_line, 
HTTP_HEADER_BLOCK_SIZE-1) != NULL) {
                                if (header_line[0] == '\n' ||
                                    header_line[0] == '\r' ||
                                    header_line[0] == '\0') {
@@ -233,7 +233,7 @@
                }
        }

-       if (stream == NULL)
+       if (stream == NULL)
                goto out;

        /* avoid buffering issues while reading header */
@@ -309,7 +309,7 @@
                }

                /* query string */
-               if (resource->query)    {
+               if (resource->query) {
                        strlcat(scratch, "?", scratch_len);
                        strlcat(scratch, resource->query, scratch_len);
                }
@@ -442,7 +442,7 @@
        }

        /* if the user has configured who they are, send a From: line */
-       if (((have_header & HTTP_HEADER_FROM) == 0) && cfg_get_string("from", 
&tmp) == SUCCESS) {
+       if (((have_header & HTTP_HEADER_FROM) == 0) && cfg_get_string("from", 
&tmp) == SUCCESS) {
                if (snprintf(scratch, scratch_len, "From: %s\r\n", tmp) > 0)
                        php_stream_write(stream, scratch, strlen(scratch));
        }
@@ -450,7 +450,7 @@
        /* Send Host: header so name-based virtual hosts work */
        if ((have_header & HTTP_HEADER_HOST) == 0) {
                if ((use_ssl && resource->port != 443 && resource->port != 0) ||
-                       (!use_ssl && resource->port != 80 && resource->port != 
0))      {
+                       (!use_ssl && resource->port != 80 && resource->port != 
0)) {
                        if (snprintf(scratch, scratch_len, "Host: %s:%i\r\n", 
resource->host, resource->port) > 0)
                                php_stream_write(stream, scratch, 
strlen(scratch));
                } else {
@@ -685,7 +685,7 @@
                php_stream_close(stream);
                stream = NULL;

-               if (location[0] != '\0')        {
+               if (location[0] != '\0') {

                        char new_path[HTTP_HEADER_BLOCK_SIZE];
                        char loc_path[HTTP_HEADER_BLOCK_SIZE];
@@ -697,7 +697,7 @@
                                                        strncasecmp(location, 
"ftps://", sizeof("ftps://")-1)))
                        {
                                if (*location != '/') {
-                                       if (*(location+1) != '\0' && 
resource->path) {
+                                       if (*(location+1) != '\0' && 
resource->path) {
                                                char *s = 
strrchr(resource->path, '/');
                                                if (!s) {
                                                        s = resource->path;
@@ -736,20 +736,20 @@
                                goto out;
                        }

-#define CHECK_FOR_CNTRL_CHARS(val) {   \
-       if (val) {      \
-               unsigned char *s, *e;   \
-               int l;  \
-               l = php_url_decode(val, strlen(val));   \
-               s = (unsigned char*)val; e = s + l;     \
-               while (s < e) { \
-                       if (iscntrl(*s)) {      \
-                               php_stream_wrapper_log_error(wrapper, options 
TSRMLS_CC, "Invalid redirect URL! %s", new_path); \
-                               goto out;       \
-                       }       \
-                       s++;    \
-               }       \
-       }       \
+#define CHECK_FOR_CNTRL_CHARS(val) { \
+       if (val) { \
+               unsigned char *s, *e; \
+               int l; \
+               l = php_url_decode(val, strlen(val)); \
+               s = (unsigned char*)val; e = s + l; \
+               while (s < e) { \
+                       if (iscntrl(*s)) { \
+                               php_stream_wrapper_log_error(wrapper, options 
TSRMLS_CC, "Invalid redirect URL! %s", new_path); \
+                               goto out; \
+                       } \
+                       s++; \
+               } \
+       } \
 }
                        /* check for control characters in login, password & 
path */
                        if (strncasecmp(new_path, "http://";, sizeof("http://";) 
- 1) || strncasecmp(new_path, "https://";, sizeof("https://";) - 1)) {
@@ -839,7 +839,7 @@
        NULL  /* rmdir */
 };

-PHPAPI php_stream_wrapper php_stream_http_wrapper =    {
+PHPAPI php_stream_wrapper php_stream_http_wrapper = {
        &http_stream_wops,
        NULL,
        1 /* is_url */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to