Documentation Source Text

Check-in [5f2e54c6c1]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix some missing error codes from the previous althttpd.c check-in.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:5f2e54c6c1101889a3ad6375eabf9b032dd93096a1130d810b9b2b20e6247b54
User & Date: drh 2018-02-25 17:29:40
Context
2018-02-25
19:24
Be sure to ParseRfc822Date() has enough precision in its output. check-in: 3fed9a6fc9 user: drh tags: trunk
17:29
Fix some missing error codes from the previous althttpd.c check-in. check-in: 5f2e54c6c1 user: drh tags: trunk
17:25
Change the action codes in the althttpd.c log to be consistent numbers, rather than source code line numbers. Include text at the end of a file that will generate a cross-reference table in SQLite. check-in: 8aafa56bb9 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to misc/althttpd.c.

1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
....
2160
2161
2162
2163
2164
2165
2166


2167
2168
        putc(c,stdout);
        nOut++;
      }
    }else{
      nRes = 0;
      nMalloc = 1000;
      aRes = malloc(nMalloc+1);
      if( aRes==0 ) Malfunction(__LINE__,"Out of memory: %d bytes", nMalloc);
      while( (c = getc(in))!=EOF ){
        if( nRes>=nMalloc ){
          nMalloc = nMalloc*2;
          aRes = realloc(aRes, nMalloc+1);
          if( aRes==0 ){
             Malfunction(__LINE__, "Out of memory: %d bytes", nMalloc);
          }
        }
        aRes[nRes++] = c;
      }
      aRes[nRes] = 0;
      nOut += printf("Content-length: %d\r\n\r\n%s", nRes, aRes);
      free(aRes);
................................................................................
INSERT INTO xref VALUES(530,'chdir() failed');
INSERT INTO xref VALUES(540,'chroot() failed');
INSERT INTO xref VALUES(550,'server startup failed');
INSERT INTO xref VALUES(560,'setgid() failed');
INSERT INTO xref VALUES(570,'setuid() failed');
INSERT INTO xref VALUES(580,'unknown user');
INSERT INTO xref VALUES(590,'cannot run as root');


COMMIT;
#endif /* SQL */







|





|







 







>
>


1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
....
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
        putc(c,stdout);
        nOut++;
      }
    }else{
      nRes = 0;
      nMalloc = 1000;
      aRes = malloc(nMalloc+1);
      if( aRes==0 ) Malfunction(600,"Out of memory: %d bytes", nMalloc);
      while( (c = getc(in))!=EOF ){
        if( nRes>=nMalloc ){
          nMalloc = nMalloc*2;
          aRes = realloc(aRes, nMalloc+1);
          if( aRes==0 ){
             Malfunction(610, "Out of memory: %d bytes", nMalloc);
          }
        }
        aRes[nRes++] = c;
      }
      aRes[nRes] = 0;
      nOut += printf("Content-length: %d\r\n\r\n%s", nRes, aRes);
      free(aRes);
................................................................................
INSERT INTO xref VALUES(530,'chdir() failed');
INSERT INTO xref VALUES(540,'chroot() failed');
INSERT INTO xref VALUES(550,'server startup failed');
INSERT INTO xref VALUES(560,'setgid() failed');
INSERT INTO xref VALUES(570,'setuid() failed');
INSERT INTO xref VALUES(580,'unknown user');
INSERT INTO xref VALUES(590,'cannot run as root');
INSERT INTO xref VALUES(600,'malloc() failed');
INSERT INTO xref VALUES(610,'malloc() failed');
COMMIT;
#endif /* SQL */