Changeset 909
- Timestamp:
- 09/06/07 19:28:33 (1 year ago)
- Files:
-
- cherokee/trunk/ChangeLog (modified) (1 diff)
- cherokee/trunk/cherokee/connection.c (modified) (4 diffs)
- cherokee/trunk/cherokee/handler.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/ChangeLog
r908 r909 1 2007-09-06 Alvaro Lopez Ortega <alvaro@alobbs.com> 2 3 * cherokee/connection.c (cherokee_connection_build_header): If the 4 handler doesn't support to add headers, don't even call the 5 handler method. It shouldn't adding the server headers either. 6 It fixes: http://code.google.com/p/cherokee/issues/detail?id=17 7 8 * cherokee/handler.h (HANDLER_SUPPORTS): Added new macro. There is 9 some clean up around the handler class macros that we need to 10 accomplish soon. 11 1 12 2007-08-04 Juan Badia <jubapa@gmail.com> 2 13 cherokee/trunk/cherokee/connection.c
r897 r909 525 525 ret_t ret; 526 526 527 /* If the handler requires not to add headers, exit. 528 */ 529 if (HANDLER_SUPPORTS (conn->handler, dont_add_headers)) 530 return ret_ok; 531 527 532 /* Try to get the headers from the handler 528 533 */ … … 530 535 if (unlikely (ret != ret_ok)) { 531 536 switch (ret) { 532 533 537 case ret_eof: 534 538 case ret_error: 535 539 case ret_eagain: 536 540 return ret; 537 538 541 default: 539 542 RET_UNKNOWN(ret); … … 542 545 } 543 546 544 if ( HANDLER_SUPPORT_MAYBE_LENGTH(conn->handler) &&545 conn->keepalive != 0) {547 if ((conn->keepalive != 0) && 548 HANDLER_SUPPORTS(conn->handler, maybe_length)) { 546 549 if (strcasestr (conn->header_buffer.buf, "Content-Length: ") == NULL) { 547 550 conn->keepalive = 0; … … 551 554 /* Add the server headers 552 555 */ 553 if (! (conn->handler->support & hsupport_dont_add_headers)) 554 build_response_header (conn, &conn->buffer); 555 556 /* Add handler headers 556 build_response_header (conn, &conn->buffer); 557 558 /* Add handler headers end EOH 557 559 */ 558 560 cherokee_buffer_add_buffer (&conn->buffer, &conn->header_buffer); 559 560 /* END of response561 */562 561 cherokee_buffer_add_str (&conn->buffer, CRLF); 563 562 cherokee/trunk/cherokee/handler.h
r841 r909 90 90 #define HANDLER_SUPPORT_COMPLEX_HEADERS(h) (HANDLER(h)->support & hsupport_complex_headers) 91 91 #define HANDLER_SUPPORT_ERROR(h) (HANDLER(h)->support & hsupport_error) 92 92 #define HANDLER_SUPPORTS(h,s) (HANDLER(h)->support & hsupport_ ## s) 93 93 94 94 /* Module information