Changeset 21107 for lang/cplusplus
- Timestamp:
- 10/11/08 09:30:26 (8 weeks ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/cplusplus/llv8call/trunk/ext/shttpd/shttpd.cc
r20753 r21107 78 78 79 79 FUNCTION_C(_arg_get_var) 80 if (args.Length() != 1 && args.Length() != 2) { 81 return ThrowException(String::New("Exception: arg.GetVar(name[, buflen])")); 82 } 80 ARG_BETWEEN(1, 2); 83 81 EXTERNAL_ARG(); 84 82 ARG_str(name, 0); … … 86 84 char *buf = new char [bufsize]; 87 85 88 shttpd_get_var(*name, arg->in.buf, arg->in.len, buf, bufsize); 86 if (!strcmp(shttpd_get_env(arg, "REQUEST_METHOD"), "POST")) { 87 shttpd_get_var(*name, arg->in.buf, arg->in.len, buf, bufsize); 88 } else { 89 const char * query_string = shttpd_get_env(arg, "QUERY_STRING"); 90 shttpd_get_var(*name, query_string, strlen(query_string), buf, bufsize); 91 } 89 92 Handle<String> ret = String::New(buf); 90 93 delete [] buf;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)