/[hydra]/hydra/src/cgi_header.c
ViewVC logotype

Diff of /hydra/src/cgi_header.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by nmav, Wed Jan 22 07:51:49 2003 UTC revision 1.6 by nmav, Sat Jul 24 17:35:38 2004 UTC
# Line 134  int process_cgi_header(request * req) Line 134  int process_cgi_header(request * req)
134          int howmuch;          int howmuch;
135    
136          if (!strncasecmp(buf, "Status: ", 8)) {          if (!strncasecmp(buf, "Status: ", 8)) {
137             char str_status[4];             char str_status[24];
138             char desc[32];             char desc[32];
139             int len;             int len;
140             char *p = buf+8;             char *p = buf+8;
# Line 142  int process_cgi_header(request * req) Line 142  int process_cgi_header(request * req)
142             len = 0;             len = 0;
143             while( *p != ' ' && *p != 0) { len++; p++; }             while( *p != ' ' && *p != 0) { len++; p++; }
144    
145             if (len > 3) { /* status code too long! */             if (len > sizeof(str_status)-1) { /* status code too long! */
146                req->buffer_start = req->buffer_end = 0;                req->buffer_start = req->buffer_end = 0;
147                  log_error_time();
148                  fprintf(stderr, "status code (%d bytes) is too long\n", len);
149                  fprintf(stderr, "status code: '%s'\n", buf+8);
150                send_r_error(req);                send_r_error(req);
151                return 0;                return 0;
152             }             }
# Line 156  int process_cgi_header(request * req) Line 159  int process_cgi_header(request * req)
159                        
160             if (len > sizeof(desc)-1) { /* description long! */             if (len > sizeof(desc)-1) { /* description long! */
161                req->buffer_start = req->buffer_end = 0;                req->buffer_start = req->buffer_end = 0;
162                  log_error_time();
163                  fprintf(stderr, "description (%d bytes) is too long\n", len);
164                send_r_error(req);                send_r_error(req);
165                return 0;                return 0;
166             }             }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26