diff src/core/ngx_string.c @ 457:ded1284520cc release-0.1.3

nginx-0.1.3-RELEASE import *) Feature: the ngx_http_autoindex_module and the autoindex directive. *) Feature: the proxy_set_x_url directive. *) Bugfix: proxy module may get caught in an endless loop when sendfile is not used.
author Igor Sysoev <igor@sysoev.ru>
date Mon, 25 Oct 2004 15:29:23 +0000
parents 295d97d70c69
children a88a3e4e158f
line wrap: on
line diff
--- a/src/core/ngx_string.c
+++ b/src/core/ngx_string.c
@@ -41,6 +41,7 @@ u_char *ngx_cpystrn(u_char *dst, u_char 
  *    %[0][width]ui    ngx_uint_t
  *    %[0][width]uxi   ngx_uint_t in hex
  *    %s               null-terminated string
+ *    %c               char
  *    %%               %
  *
  */
@@ -223,6 +224,13 @@ u_char *ngx_sprintf(u_char *buf, char *f
 
                 continue;
 
+            case 'c':
+                d = va_arg(arg, int);
+                *buf++ = (u_char) (d & 0xff);
+                fmt++;
+
+                continue;
+
             case '%':
                 *buf++ = '%';
                 fmt++;