httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r572051 - /httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_connect.c
Date Sun, 02 Sep 2007 17:42:59 GMT
Author: jim
Date: Sun Sep  2 10:42:59 2007
New Revision: 572051

URL: http://svn.apache.org/viewvc?rev=572051&view=rev
Log:
Non func change. formatting

Modified:
    httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_connect.c

Modified: httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_connect.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_connect.c?rev=572051&r1=572050&r2=572051&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_connect.c (original)
+++ httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_connect.c Sun Sep  2 10:42:59 2007
@@ -113,19 +113,21 @@
 
     /* we break the URL into host, port, uri */
     if (APR_SUCCESS != apr_uri_parse_hostinfo(p, url, &uri)) {
-    return ap_proxyerror(r, HTTP_BAD_REQUEST,
-                 apr_pstrcat(p, "URI cannot be parsed: ", url, NULL));
+        return ap_proxyerror(r, HTTP_BAD_REQUEST,
+                             apr_pstrcat(p, "URI cannot be parsed: ", url,
+                                         NULL));
     }
 
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
          "proxy: CONNECT: connecting %s to %s:%d", url, uri.hostname, uri.port);
 
     /* do a DNS lookup for the destination host */
-    err = apr_sockaddr_info_get(&uri_addr, uri.hostname, APR_UNSPEC, uri.port, 0, p);
+    err = apr_sockaddr_info_get(&uri_addr, uri.hostname, APR_UNSPEC, uri.port,
+                                0, p);
     if (APR_SUCCESS != err) {
-	return ap_proxyerror(r, HTTP_BAD_GATEWAY, apr_pstrcat(p,
-			     "DNS lookup failure for: ",
-			     uri.hostname, NULL));
+        return ap_proxyerror(r, HTTP_BAD_GATEWAY,
+                             apr_pstrcat(p, "DNS lookup failure for: ",
+                                         uri.hostname, NULL));
     }
 
     /* are we connecting directly, or via a proxy? */
@@ -144,24 +146,24 @@
  
     /* check if ProxyBlock directive on this host */
     if (OK != ap_proxy_checkproxyblock(r, conf, uri_addr)) {
-    return ap_proxyerror(r, HTTP_FORBIDDEN,
-                 "Connect to remote machine blocked");
+        return ap_proxyerror(r, HTTP_FORBIDDEN,
+                             "Connect to remote machine blocked");
     }
 
     /* Check if it is an allowed port */
     if (conf->allowed_connect_ports->nelts == 0) {
     /* Default setting if not overridden by AllowCONNECT */
-    switch (uri.port) {
-        case APR_URI_HTTPS_DEFAULT_PORT:
-        case APR_URI_SNEWS_DEFAULT_PORT:
-        break;
-        default:
+        switch (uri.port) {
+            case APR_URI_HTTPS_DEFAULT_PORT:
+            case APR_URI_SNEWS_DEFAULT_PORT:
+                break;
+            default:
                 /* XXX can we call ap_proxyerror() here to get a nice log message? */
-        return HTTP_FORBIDDEN;
-    }
+                return HTTP_FORBIDDEN;
+        }
     } else if(!allowed_port(conf, uri.port)) {
         /* XXX can we call ap_proxyerror() here to get a nice log message? */
-    return HTTP_FORBIDDEN;
+        return HTTP_FORBIDDEN;
     }
 
     /*
@@ -174,9 +176,9 @@
      * until we get a successful connection
      */
     if (APR_SUCCESS != err) {
-    return ap_proxyerror(r, HTTP_BAD_GATEWAY, apr_pstrcat(p,
-                             "DNS lookup failure for: ",
-                             connectname, NULL));
+        return ap_proxyerror(r, HTTP_BAD_GATEWAY,
+                             apr_pstrcat(p, "DNS lookup failure for: ",
+                                         connectname, NULL));
     }
 
     /*
@@ -265,9 +267,8 @@
 
 /*    r->sent_bodyct = 1;*/
 
-    if ((rv = apr_pollset_create(&pollset, 2, r->pool, 0)) != APR_SUCCESS)
-    {
-    apr_socket_close(sock);
+    if ((rv = apr_pollset_create(&pollset, 2, r->pool, 0)) != APR_SUCCESS) {
+        apr_socket_close(sock);
         ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
             "proxy: CONNECT: error apr_pollset_create()");
         return HTTP_INTERNAL_SERVER_ERROR;
@@ -287,7 +288,7 @@
 
     while (1) { /* Infinite loop until error (one side closes the connection) */
         if ((rv = apr_pollset_poll(pollset, -1, &pollcnt, &signalled)) != APR_SUCCESS)
{
-        apr_socket_close(sock);
+            apr_socket_close(sock);
             ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "proxy: CONNECT: error apr_poll()");
             return HTTP_INTERNAL_SERVER_ERROR;
         }



Mime
View raw message