/[Apache-SVN]/httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
ViewVC logotype

Diff of /httpd/httpd/trunk/modules/proxy/mod_proxy_http.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1610674 by jorton, Tue Jul 15 12:27:00 2014 UTC revision 1610814 by covener, Tue Jul 15 19:11:02 2014 UTC
# Line 1003  static request_rec *make_fake_req(conn_r Line 1003  static request_rec *make_fake_req(conn_r
1003      rp->status          = HTTP_OK;      rp->status          = HTTP_OK;
1004    
1005      rp->headers_in      = apr_table_make(pool, 50);      rp->headers_in      = apr_table_make(pool, 50);
1006        rp->trailers_in     = apr_table_make(pool, 5);
1007    
1008      rp->subprocess_env  = apr_table_make(pool, 50);      rp->subprocess_env  = apr_table_make(pool, 50);
1009      rp->headers_out     = apr_table_make(pool, 12);      rp->headers_out     = apr_table_make(pool, 12);
1010        rp->trailers_out    = apr_table_make(pool, 5);
1011      rp->err_headers_out = apr_table_make(pool, 5);      rp->err_headers_out = apr_table_make(pool, 5);
1012      rp->notes           = apr_table_make(pool, 5);      rp->notes           = apr_table_make(pool, 5);
1013    
# Line 1085  static void ap_proxy_read_headers(reques Line 1088  static void ap_proxy_read_headers(reques
1088      psc = (proxy_server_conf *) ap_get_module_config(sconf, &proxy_module);      psc = (proxy_server_conf *) ap_get_module_config(sconf, &proxy_module);
1089    
1090      r->headers_out = apr_table_make(r->pool, 20);      r->headers_out = apr_table_make(r->pool, 20);
1091        r->trailers_out = apr_table_make(r->pool, 5);
1092      *pread_len = 0;      *pread_len = 0;
1093    
1094      /*      /*
# Line 1215  apr_status_t ap_proxygetline(apr_bucket_ Line 1219  apr_status_t ap_proxygetline(apr_bucket_
1219  #define AP_MAX_INTERIM_RESPONSES 10  #define AP_MAX_INTERIM_RESPONSES 10
1220  #endif  #endif
1221    
1222    static int add_trailers(void *data, const char *key, const char *val)
1223    {
1224        if (val) {
1225            apr_table_add((apr_table_t*)data, key, val);
1226        }
1227        return 1;
1228    }
1229    
1230  static  static
1231  int ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,  int ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
1232          proxy_conn_rec **backend_ptr, proxy_worker *worker,          proxy_conn_rec **backend_ptr, proxy_worker *worker,
# Line 1738  int ap_proxy_http_process_response(apr_p Line 1750  int ap_proxy_http_process_response(apr_p
1750                      /* next time try a non-blocking read */                      /* next time try a non-blocking read */
1751                      mode = APR_NONBLOCK_READ;                      mode = APR_NONBLOCK_READ;
1752    
1753                        if (!apr_is_empty_table(backend->r->trailers_in)) {
1754                            apr_table_do(add_trailers, r->trailers_out,
1755                                    backend->r->trailers_in, NULL);
1756                            apr_table_clear(backend->r->trailers_in);
1757                        }
1758    
1759                      apr_brigade_length(bb, 0, &readbytes);                      apr_brigade_length(bb, 0, &readbytes);
1760                      backend->worker->s->read += readbytes;                      backend->worker->s->read += readbytes;
1761  #if DEBUGGING  #if DEBUGGING

Legend:
Removed from v.1610674  
changed lines
  Added in v.1610814

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26