From 07657b8a9f5c2fd9047594ec8604b9c439a999e4 Mon Sep 17 00:00:00 2001
From: Aleksey Veresov ");
+ printf(" ");
+ /* Iterate through all cookies in request to show them in body: */
for (current = r->cookies; current; current = current->next) {
magi_cookie *c = ¤t->item;
- magi_response(r, "Cookie with name [");
- magi_response(r, c->name);
+ printf("Cookie with name [%s", c->name);
if (c->data) {
- magi_response(r, "] is [");
- magi_response(r, c->data);
+ printf("] is [%s", c->data);
}
if (c->domain) {
- magi_response(r, "] for domain [");
- magi_response(r, c->domain);
+ printf("] for domain [%s", c->domain);
}
if (c->path) {
- magi_response(r, "] for path [");
- magi_response(r, c->path);
+ printf("] for path [%s", c->path);
}
- magi_response(r, "]
");
+ printf("]
");
}
- magi_response(r, "
"); + printf("
");
+ /* Iterate through specified params to show them in body: */
for (; current; current = current->next) {
magi_param *p = ¤t->item;
- magi_response_format(r, "[%s] is [%s]
", p->name, p->data);
+ printf("[%s] is [%s]
", p->name, p->data);
}
- magi_response(r, "
"); + printf("
");
+ /* Iterate through all field files in request to show them in body: */
for (current = r->files; current; current = current->next) {
magi_file *f = ¤t->item;
- magi_response_format(r, "[%s] was [%s] on clientside
",
- f->field, f->filename);
+ printf("[%s] was [%s] on clientside
", f->field, f->filename);
}
- magi_response(r, "
I was called "); + printf("
I was called "); if (r->is_secure) { - magi_response(r, "securely "); + printf("securely "); } - magi_response_format(r, "with method [%s", r->method); + printf("with method [%s", r->method); if (r->host) { - magi_response_format(r, "] on server [%s", r->host); + printf("] on server [%s", r->host); } if (r->script) { - magi_response_format(r, "] being script on [%s", r->script); + printf("] being script on [%s", r->script); } if (r->path) { - magi_response_format(r, "] with requested path [%s", r->path); + printf("] with requested path [%s", r->path); } - magi_response(r, "]
"); + printf("]"); } void response(magi_request *r) { - magi_response(r, - "" - "" - "