Changeset 991
- Timestamp:
- 03/06/08 02:41:24 (6 months ago)
- Files:
-
- trunk/ext/http11/http11.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ext/http11/http11.c
r990 r991 22 22 #define id_handler_map rb_intern("@handler_map") 23 23 #define id_http_body rb_intern("@http_body") 24 25 static VALUE global_http_prefix; 24 #define HTTP_PREFIX "HTTP_" 25 #define HTTP_PREFIX_LEN (sizeof(HTTP_PREFIX) - 1) 26 26 27 static VALUE global_request_method; 27 28 static VALUE global_request_uri; … … 85 86 * null-terminated for us. 86 87 */ 87 f = rb_str_new(NULL, RSTRING_LEN(global_http_prefix) + flen); 88 memcpy(RSTRING_PTR(f), 89 RSTRING_PTR(global_http_prefix), 90 RSTRING_LEN(global_http_prefix)); 91 memcpy(RSTRING_PTR(f) + RSTRING_LEN(global_http_prefix), field, flen); 88 f = rb_str_new(NULL, HTTP_PREFIX_LEN + flen); 89 memcpy(RSTRING_PTR(f), HTTP_PREFIX, HTTP_PREFIX_LEN); 90 memcpy(RSTRING_PTR(f) + HTTP_PREFIX_LEN, field, flen); 92 91 93 92 rb_hash_aset(req, f, v); … … 375 374 mMongrel = rb_define_module("Mongrel"); 376 375 377 DEF_GLOBAL(http_prefix, "HTTP_");378 376 DEF_GLOBAL(request_method, "REQUEST_METHOD"); 379 377 DEF_GLOBAL(request_uri, "REQUEST_URI");
