http/examine: added dest param for cmd, debug msg fixes

This commit is contained in:
Gabor Adam Toth 2010-02-22 08:33:32 +01:00
parent b8a290ab46
commit af95219a9e
4 changed files with 5 additions and 4 deletions

View File

@ -1352,8 +1352,9 @@ _PAGES_start_description
|<script> |<script>
|var longer = 44 |var longer = 44
| |
|function cmd(wish) { |function cmd(wish, dest) {
| Pef.cmd.value = wish | Pef.cmd.value = wish
| Pef.dest.value = dest || ''
| Pef.submit() | Pef.submit()
| longer = 44 | longer = 44
| return false | return false

View File

@ -15,7 +15,7 @@ htget(prot, query, headers, qs) {
} else unless (user->validToken(query["token"])) { } else unless (user->validToken(query["token"])) {
t = "_error_invalid_authentication_token"; t = "_error_invalid_authentication_token";
} else if ((t = query["cmd"]) && strlen(t)) { } else if ((t = query["cmd"]) && strlen(t)) {
user->parsecmd(t); // htcmd? user->parsecmd(t, query["dest"]); // htcmd?
t = "_echo_execute_web"; t = "_echo_execute_web";
} else if (t = user->htDescription(0, query, headers, qs, "")) { } else if (t = user->htDescription(0, query, headers, qs, "")) {
P4(("result: %O\n", t)) P4(("result: %O\n", t))

View File

@ -14,7 +14,7 @@ http_ok(string prot, string type, string extra) {
out = type || extra ? htheaders(type, extra) +"\n" out = type || extra ? htheaders(type, extra) +"\n"
: "Content-type: " DEFAULT_CONTENT_TYPE "\n\n"; : "Content-type: " DEFAULT_CONTENT_TYPE "\n\n";
emit(out = HTTP_SVERS " 200 Sure\n"+ out); emit(out = HTTP_SVERS " 200 Sure\n"+ out);
P3((out)) P3(("http_ok: out: %O\s", out))
} }
varargs http_error(string prot, int code, string comment, string html) { varargs http_error(string prot, int code, string comment, string html) {

View File

@ -86,7 +86,7 @@ parse_url(input) {
parse_header(input) { parse_header(input) {
string key, val; string key, val;
P4((input + "\n")) P4(("parse_header(%O)\n", input))
unless (input == "") { unless (input == "") {
if (sscanf(input, "%s:%1.0t%s", key, val)) { if (sscanf(input, "%s:%1.0t%s", key, val)) {