comparison src/c/fastcgi.c @ 1799:3d922a28370b

Basis.getenv
author Adam Chlipala <adam@chlipala.net>
date Thu, 02 Aug 2012 16:33:25 -0400
parents a6eab6820b37
children 6745eafff617
comparison
equal deleted inserted replaced
1798:10a2cb93d175 1799:3d922a28370b
225 if ((s = search_nvps(hs->nvps, hs->uppercased + 5))) 225 if ((s = search_nvps(hs->nvps, hs->uppercased + 5)))
226 return s; 226 return s;
227 } 227 }
228 228
229 return search_nvps(hs->nvps, hs->uppercased); 229 return search_nvps(hs->nvps, hs->uppercased);
230 }
231
232 static char *get_env(void *data, const char *h) {
233 headers *hs = (headers *)data;
234
235 return search_nvps(hs->nvps, h);
230 } 236 }
231 237
232 static int read_funny_len(unsigned char **buf, int *len) { 238 static int read_funny_len(unsigned char **buf, int *len) {
233 if (*len <= 0) 239 if (*len <= 0)
234 return -1; 240 return -1;
469 475
470 if (!(query_string = search_nvps(hs.nvps, "QUERY_STRING"))) 476 if (!(query_string = search_nvps(hs.nvps, "QUERY_STRING")))
471 query_string = ""; 477 query_string = "";
472 478
473 uw_set_headers(ctx, get_header, &hs); 479 uw_set_headers(ctx, get_header, &hs);
480 uw_set_env(ctx, get_env, &hs);
474 481
475 { 482 {
476 request_result rr; 483 request_result rr;
477 484
478 rr = uw_request(rc, ctx, method, path, query_string, body, body_read, 485 rr = uw_request(rc, ctx, method, path, query_string, body, body_read,