Mercurial > urweb
comparison src/c/urweb.c @ 2220:794017f378de
Merge.
author | Ziv Scully <ziv@mit.edu> |
---|---|
date | Mon, 24 Nov 2014 20:47:38 -0500 |
parents | 98b87d905601 1839df6ed755 |
children | 5709482a2afd |
comparison
equal
deleted
inserted
replaced
2219:ff38b3e0cdfd | 2220:794017f378de |
---|---|
477 char *output_buffer; | 477 char *output_buffer; |
478 size_t output_buffer_size; | 478 size_t output_buffer_size; |
479 | 479 |
480 // For caching. | 480 // For caching. |
481 char *recording; | 481 char *recording; |
482 | |
483 int remoteSock; | |
482 }; | 484 }; |
483 | 485 |
484 size_t uw_headers_max = SIZE_MAX; | 486 size_t uw_headers_max = SIZE_MAX; |
485 size_t uw_page_max = SIZE_MAX; | 487 size_t uw_page_max = SIZE_MAX; |
486 size_t uw_heap_max = SIZE_MAX; | 488 size_t uw_heap_max = SIZE_MAX; |
561 | 563 |
562 ctx->output_buffer = malloc(1); | 564 ctx->output_buffer = malloc(1); |
563 ctx->output_buffer_size = 1; | 565 ctx->output_buffer_size = 1; |
564 | 566 |
565 ctx->recording = 0; | 567 ctx->recording = 0; |
568 | |
569 ctx->remoteSock = -1; | |
566 | 570 |
567 return ctx; | 571 return ctx; |
568 } | 572 } |
569 | 573 |
570 size_t uw_inputs_max = SIZE_MAX; | 574 size_t uw_inputs_max = SIZE_MAX; |
649 ctx->queryString = NULL; | 653 ctx->queryString = NULL; |
650 ctx->nextId = 0; | 654 ctx->nextId = 0; |
651 ctx->amInitializing = 0; | 655 ctx->amInitializing = 0; |
652 ctx->usedSig = 0; | 656 ctx->usedSig = 0; |
653 ctx->needsResig = 0; | 657 ctx->needsResig = 0; |
658 ctx->remoteSock = -1; | |
654 } | 659 } |
655 | 660 |
656 void uw_reset_keep_request(uw_context ctx) { | 661 void uw_reset_keep_request(uw_context ctx) { |
657 uw_reset_keep_error_message(ctx); | 662 uw_reset_keep_error_message(ctx); |
658 ctx->error_message[0] = 0; | 663 ctx->error_message[0] = 0; |
4469 if (!isalnum(*p) && *p != '-' && *p != '_') | 4474 if (!isalnum(*p) && *p != '-' && *p != '_') |
4470 uw_error(ctx, FATAL, "Illegal HTML5 data-* attribute: %s", s); | 4475 uw_error(ctx, FATAL, "Illegal HTML5 data-* attribute: %s", s); |
4471 | 4476 |
4472 return s; | 4477 return s; |
4473 } | 4478 } |
4479 | |
4480 int uw_remoteSock(uw_context ctx) { | |
4481 return ctx->remoteSock; | |
4482 } | |
4483 | |
4484 void uw_set_remoteSock(uw_context ctx, int sock) { | |
4485 ctx->remoteSock = sock; | |
4486 } |