Changeset 644
- Timestamp:
- 02/15/07 00:34:14 (2 years ago)
- Files:
-
- cherokee/trunk/ChangeLog (modified) (1 diff)
- cherokee/trunk/cherokee/http.c (modified) (2 diffs)
- cherokee/trunk/cherokee/http.h (modified) (2 diffs)
- cherokee/trunk/cherokee/util.c (modified) (2 diffs)
- cherokee/trunk/cherokee/util.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/ChangeLog
r642 r644 1 2007-02-14 Alvaro Lopez Ortega <alvaro@alobbs.com> 2 3 * cherokee/http.h, cherokee/http.c (cherokee_http_code_to_string) 4 (cherokee_http_code_copy): Added http_gateway_timeout. 5 1 6 2007-02-03 A.D.F <adefacc@tin.it> 2 7 * cherokee/macros.h: cherokee/trunk/cherokee/http.c
r633 r644 116 116 case http_continue: *str = http_continue_string; break; 117 117 case http_switching_protocols: *str = http_switching_protocols_string; break; 118 case http_gateway_timeout: *str = http_gateway_timeout_string; break; 118 119 default: 119 120 *str = "500 Unknown error"; … … 154 155 entry_code (bad_gateway); 155 156 entry_code (service_unavailable); 157 entry_code (gateway_timeout); 156 158 default: 157 159 PRINT_ERROR ("ERROR: Unknown HTTP status code %d\n", code); cherokee/trunk/cherokee/http.h
r633 r644 105 105 http_internal_error = 500, 106 106 http_bad_gateway = 502, 107 http_service_unavailable = 503 107 http_service_unavailable = 503, 108 http_gateway_timeout = 504 108 109 } cherokee_http_t; 109 110 … … 130 131 #define http_bad_gateway_string "502 Bad gateway" 131 132 #define http_service_unavailable_string "503 Service Unavailable" 133 #define http_gateway_timeout_string "504 Gatewat Timeout" 132 134 133 135 #define http_type_200_max 206 cherokee/trunk/cherokee/util.c
r625 r644 146 146 return (s1<s2) ? s1 : s2; 147 147 } 148 149 150 char * 151 cherokee_max_str (char *s1, char *s2) 152 { 153 if ((s1 == NULL) && 154 (s2 == NULL)) return NULL; 155 156 if ((s1 != NULL) && 157 (s2 == NULL)) return s1; 158 159 if ((s2 != NULL) && 160 (s1 == NULL)) return s2; 161 162 return (s1>s2) ? s1 : s2; 163 } 164 148 165 149 166 … … 1265 1282 } 1266 1283 1284 1285 ret_t 1286 cherokee_get_shell (const char **shell, const char **binary) 1287 { 1288 char *t1, *t2; 1289 1290 /* Set the shell path 1291 */ 1292 #ifdef _WIN32 1293 *shell = getenv("ComSpec"); 1294 #else 1295 *shell = "/bin/sh"; 1296 #endif 1297 1298 /* Find the binary 1299 */ 1300 t1 = rindex (*shell, '\\'); 1301 t2 = rindex (*shell, '/'); 1302 1303 t1 = cherokee_max_str (t1, t2); 1304 if (t1 == NULL) return ret_error; 1305 1306 *binary = &t1[1]; 1307 1308 return ret_ok; 1309 } cherokee/trunk/cherokee/util.h
r597 r644 75 75 int cherokee_isbigendian (void); 76 76 char *cherokee_min_str (char *s1, char *s2); 77 char *cherokee_max_str (char *s1, char *s2); 77 78 char *cherokee_strfsize (unsigned long long size, char *buf); 78 79 size_t cherokee_strlcat (char *dst, const char *src, size_t siz); … … 100 101 ret_t cherokee_sys_fdlimit_set (cuint_t limit); 101 102 ret_t cherokee_close_fd (cint_t fd); 103 ret_t cherokee_get_shell (const char **shell, const char **binary); 102 104 void cherokee_trace (const char *entry, const char *file, int line, const char *func, const char *fmt, ...); 103 105