Changeset 910
- Timestamp:
- 09/06/07 19:50:30 (1 year ago)
- Files:
-
- cherokee/trunk/ChangeLog (modified) (1 diff)
- cherokee/trunk/cherokee/connection.c (modified) (6 diffs)
- cherokee/trunk/cherokee/handler.h (modified) (1 diff)
- cherokee/trunk/cherokee/thread.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/ChangeLog
r909 r910 1 1 2007-09-06 Alvaro Lopez Ortega <alvaro@alobbs.com> 2 3 * cherokee/thread.c cherokee/handler.h cherokee/connection.c: 4 Handler support macros cleaned up. 2 5 3 6 * cherokee/connection.c (cherokee_connection_build_header): If the cherokee/trunk/cherokee/connection.c
r909 r910 527 527 /* If the handler requires not to add headers, exit. 528 528 */ 529 if (HANDLER_SUPPORTS (conn->handler, dont_add_headers))529 if (HANDLER_SUPPORTS (conn->handler, hsupport_dont_add_headers)) 530 530 return ret_ok; 531 531 … … 546 546 547 547 if ((conn->keepalive != 0) && 548 HANDLER_SUPPORTS(conn->handler, maybe_length)) {548 HANDLER_SUPPORTS(conn->handler, hsupport_maybe_length)) { 549 549 if (strcasestr (conn->header_buffer.buf, "Content-Length: ") == NULL) { 550 550 conn->keepalive = 0; … … 801 801 * it has to count the bytes sent 802 802 */ 803 if (!HANDLER_SUPPORT _LENGTH(conn->handler)) {803 if (!HANDLER_SUPPORTS (conn->handler, hsupport_length)) { 804 804 conn->range_end += sent; 805 805 } … … 1797 1797 /* Look for "Range:" 1798 1798 */ 1799 if (HANDLER_SUPPORT _RANGE(conn->handler)) {1799 if (HANDLER_SUPPORTS (conn->handler, hsupport_range)) { 1800 1800 ret = cherokee_header_get_known (&conn->header, header_range, &ptr, &ptr_len); 1801 1801 if (ret == ret_ok) { … … 1858 1858 * then verify whether the handler supports it. 1859 1859 */ 1860 if ((HANDLER_SUPPORT _LENGTH(conn->handler) == 0) &&1861 (HANDLER_SUPPORT _MAYBE_LENGTH(conn->handler) == 0) &&1862 conn->keepalive != 0) {1860 if ((HANDLER_SUPPORTS (conn->handler, hsupport_length) == 0) && 1861 (HANDLER_SUPPORTS (conn->handler, hsupport_maybe_length) == 0) && 1862 conn->keepalive != 0) { 1863 1863 conn->keepalive = 0; 1864 1864 } … … 1884 1884 at_end = true; 1885 1885 else 1886 at_end = ! HANDLER_SUPPORT _LENGTH(conn->handler);1886 at_end = ! HANDLER_SUPPORTS (conn->handler, hsupport_length); 1887 1887 1888 1888 /* Set the option bit mask cherokee/trunk/cherokee/handler.h
r909 r910 81 81 82 82 83 #define HANDLER(x) ((cherokee_handler_t *)(x)) 84 #define HANDLER_CONN(h) (CONN(HANDLER(h)->connection)) 85 #define HANDLER_SRV(h) (CONN_SRV(HANDLER_CONN(h))) 86 #define HANDLER_THREAD(h) (CONN_THREAD(HANDLER_CONN(h))) 87 #define HANDLER_SUPPORT_RANGE(h) (HANDLER(h)->support & hsupport_range) 88 #define HANDLER_SUPPORT_LENGTH(h) (HANDLER(h)->support & hsupport_length) 89 #define HANDLER_SUPPORT_MAYBE_LENGTH(h) (HANDLER(h)->support & hsupport_maybe_length) 90 #define HANDLER_SUPPORT_COMPLEX_HEADERS(h) (HANDLER(h)->support & hsupport_complex_headers) 91 #define HANDLER_SUPPORT_ERROR(h) (HANDLER(h)->support & hsupport_error) 92 #define HANDLER_SUPPORTS(h,s) (HANDLER(h)->support & hsupport_ ## s) 83 #define HANDLER(x) ((cherokee_handler_t *)(x)) 84 #define HANDLER_CONN(h) (CONN(HANDLER(h)->connection)) 85 #define HANDLER_SRV(h) (CONN_SRV(HANDLER_CONN(h))) 86 #define HANDLER_THREAD(h) (CONN_THREAD(HANDLER_CONN(h))) 87 #define HANDLER_SUPPORTS(h,s) (HANDLER(h)->support & s) 88 93 89 94 90 /* Module information cherokee/trunk/cherokee/thread.c
r892 r910 1114 1114 http_type_400(conn->error_code) || 1115 1115 http_type_500(conn->error_code)) && 1116 conn->handler && (!HANDLER_SUPPORT _ERROR(conn->handler)))1116 conn->handler && (!HANDLER_SUPPORTS (conn->handler, hsupport_error))) 1117 1117 { 1118 1118 /* Try to setup an error handler … … 1164 1164 http_type_400 (conn->error_code) || 1165 1165 http_type_500 (conn->error_code)) && 1166 (!HANDLER_SUPPORT _ERROR(conn->handler))) {1166 (!HANDLER_SUPPORTS (conn->handler, hsupport_error))) { 1167 1167 conn->phase = phase_setup_connection; 1168 1168 continue;