Fossil SCM
Fix typos.
Commit
58f00d333ac3fb6f78a8d4e49bd4290f8a82ebc0472a17451d5eefe1cea57850
Parent
455c743ab46b9f6…
2 files changed
+11
-11
+1
-1
+11
-11
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -711,36 +711,36 @@ | ||
| 711 | 711 | return z; |
| 712 | 712 | } |
| 713 | 713 | |
| 714 | 714 | /* |
| 715 | 715 | ** The input *pz points to content that is terminated by a "\r\n" |
| 716 | -** followed by the boundry marker zBoundry. An extra "--" may or | |
| 717 | -** may not be appended to the boundry marker. There are *pLen characters | |
| 716 | +** followed by the boundary marker zBoundary. An extra "--" may or | |
| 717 | +** may not be appended to the boundary marker. There are *pLen characters | |
| 718 | 718 | ** in *pz. |
| 719 | 719 | ** |
| 720 | 720 | ** This routine adds a "\000" to the end of the content (overwriting |
| 721 | 721 | ** the "\r\n") and returns a pointer to the content. The *pz input |
| 722 | -** is adjusted to point to the first line following the boundry. | |
| 722 | +** is adjusted to point to the first line following the boundary. | |
| 723 | 723 | ** The length of the content is stored in *pnContent. |
| 724 | 724 | */ |
| 725 | 725 | static char *get_bounded_content( |
| 726 | 726 | char **pz, /* Content taken from here */ |
| 727 | 727 | int *pLen, /* Number of bytes of data in (*pz)[] */ |
| 728 | - char *zBoundry, /* Boundry text marking the end of content */ | |
| 728 | + char *zBoundary, /* Boundary text marking the end of content */ | |
| 729 | 729 | int *pnContent /* Write the size of the content here */ |
| 730 | 730 | ){ |
| 731 | 731 | char *z = *pz; |
| 732 | 732 | int len = *pLen; |
| 733 | 733 | int i; |
| 734 | - int nBoundry = strlen(zBoundry); | |
| 734 | + int nBoundary = strlen(zBoundary); | |
| 735 | 735 | *pnContent = len; |
| 736 | 736 | for(i=0; i<len; i++){ |
| 737 | - if( z[i]=='\n' && strncmp(zBoundry, &z[i+1], nBoundry)==0 ){ | |
| 737 | + if( z[i]=='\n' && strncmp(zBoundary, &z[i+1], nBoundary)==0 ){ | |
| 738 | 738 | if( i>0 && z[i-1]=='\r' ) i--; |
| 739 | 739 | z[i] = 0; |
| 740 | 740 | *pnContent = i; |
| 741 | - i += nBoundry; | |
| 741 | + i += nBoundary; | |
| 742 | 742 | break; |
| 743 | 743 | } |
| 744 | 744 | } |
| 745 | 745 | *pz = &z[i]; |
| 746 | 746 | get_line_from_string(pz, pLen); |
| @@ -805,22 +805,22 @@ | ||
| 805 | 805 | ** table. |
| 806 | 806 | */ |
| 807 | 807 | static void process_multipart_form_data(char *z, int len){ |
| 808 | 808 | char *zLine; |
| 809 | 809 | int nArg, i; |
| 810 | - char *zBoundry; | |
| 810 | + char *zBoundary; | |
| 811 | 811 | char *zValue; |
| 812 | 812 | char *zName = 0; |
| 813 | 813 | int showBytes = 0; |
| 814 | 814 | char *azArg[50]; |
| 815 | 815 | |
| 816 | - zBoundry = get_line_from_string(&z, &len); | |
| 817 | - if( zBoundry==0 ) return; | |
| 816 | + zBoundary = get_line_from_string(&z, &len); | |
| 817 | + if( zBoundary==0 ) return; | |
| 818 | 818 | while( (zLine = get_line_from_string(&z, &len))!=0 ){ |
| 819 | 819 | if( zLine[0]==0 ){ |
| 820 | 820 | int nContent = 0; |
| 821 | - zValue = get_bounded_content(&z, &len, zBoundry, &nContent); | |
| 821 | + zValue = get_bounded_content(&z, &len, zBoundary, &nContent); | |
| 822 | 822 | if( zName && zValue ){ |
| 823 | 823 | if( fossil_islower(zName[0]) ){ |
| 824 | 824 | cgi_set_parameter_nocopy(zName, zValue, 1); |
| 825 | 825 | if( showBytes ){ |
| 826 | 826 | cgi_set_parameter_nocopy(mprintf("%s:bytes", zName), |
| 827 | 827 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -711,36 +711,36 @@ | |
| 711 | return z; |
| 712 | } |
| 713 | |
| 714 | /* |
| 715 | ** The input *pz points to content that is terminated by a "\r\n" |
| 716 | ** followed by the boundry marker zBoundry. An extra "--" may or |
| 717 | ** may not be appended to the boundry marker. There are *pLen characters |
| 718 | ** in *pz. |
| 719 | ** |
| 720 | ** This routine adds a "\000" to the end of the content (overwriting |
| 721 | ** the "\r\n") and returns a pointer to the content. The *pz input |
| 722 | ** is adjusted to point to the first line following the boundry. |
| 723 | ** The length of the content is stored in *pnContent. |
| 724 | */ |
| 725 | static char *get_bounded_content( |
| 726 | char **pz, /* Content taken from here */ |
| 727 | int *pLen, /* Number of bytes of data in (*pz)[] */ |
| 728 | char *zBoundry, /* Boundry text marking the end of content */ |
| 729 | int *pnContent /* Write the size of the content here */ |
| 730 | ){ |
| 731 | char *z = *pz; |
| 732 | int len = *pLen; |
| 733 | int i; |
| 734 | int nBoundry = strlen(zBoundry); |
| 735 | *pnContent = len; |
| 736 | for(i=0; i<len; i++){ |
| 737 | if( z[i]=='\n' && strncmp(zBoundry, &z[i+1], nBoundry)==0 ){ |
| 738 | if( i>0 && z[i-1]=='\r' ) i--; |
| 739 | z[i] = 0; |
| 740 | *pnContent = i; |
| 741 | i += nBoundry; |
| 742 | break; |
| 743 | } |
| 744 | } |
| 745 | *pz = &z[i]; |
| 746 | get_line_from_string(pz, pLen); |
| @@ -805,22 +805,22 @@ | |
| 805 | ** table. |
| 806 | */ |
| 807 | static void process_multipart_form_data(char *z, int len){ |
| 808 | char *zLine; |
| 809 | int nArg, i; |
| 810 | char *zBoundry; |
| 811 | char *zValue; |
| 812 | char *zName = 0; |
| 813 | int showBytes = 0; |
| 814 | char *azArg[50]; |
| 815 | |
| 816 | zBoundry = get_line_from_string(&z, &len); |
| 817 | if( zBoundry==0 ) return; |
| 818 | while( (zLine = get_line_from_string(&z, &len))!=0 ){ |
| 819 | if( zLine[0]==0 ){ |
| 820 | int nContent = 0; |
| 821 | zValue = get_bounded_content(&z, &len, zBoundry, &nContent); |
| 822 | if( zName && zValue ){ |
| 823 | if( fossil_islower(zName[0]) ){ |
| 824 | cgi_set_parameter_nocopy(zName, zValue, 1); |
| 825 | if( showBytes ){ |
| 826 | cgi_set_parameter_nocopy(mprintf("%s:bytes", zName), |
| 827 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -711,36 +711,36 @@ | |
| 711 | return z; |
| 712 | } |
| 713 | |
| 714 | /* |
| 715 | ** The input *pz points to content that is terminated by a "\r\n" |
| 716 | ** followed by the boundary marker zBoundary. An extra "--" may or |
| 717 | ** may not be appended to the boundary marker. There are *pLen characters |
| 718 | ** in *pz. |
| 719 | ** |
| 720 | ** This routine adds a "\000" to the end of the content (overwriting |
| 721 | ** the "\r\n") and returns a pointer to the content. The *pz input |
| 722 | ** is adjusted to point to the first line following the boundary. |
| 723 | ** The length of the content is stored in *pnContent. |
| 724 | */ |
| 725 | static char *get_bounded_content( |
| 726 | char **pz, /* Content taken from here */ |
| 727 | int *pLen, /* Number of bytes of data in (*pz)[] */ |
| 728 | char *zBoundary, /* Boundary text marking the end of content */ |
| 729 | int *pnContent /* Write the size of the content here */ |
| 730 | ){ |
| 731 | char *z = *pz; |
| 732 | int len = *pLen; |
| 733 | int i; |
| 734 | int nBoundary = strlen(zBoundary); |
| 735 | *pnContent = len; |
| 736 | for(i=0; i<len; i++){ |
| 737 | if( z[i]=='\n' && strncmp(zBoundary, &z[i+1], nBoundary)==0 ){ |
| 738 | if( i>0 && z[i-1]=='\r' ) i--; |
| 739 | z[i] = 0; |
| 740 | *pnContent = i; |
| 741 | i += nBoundary; |
| 742 | break; |
| 743 | } |
| 744 | } |
| 745 | *pz = &z[i]; |
| 746 | get_line_from_string(pz, pLen); |
| @@ -805,22 +805,22 @@ | |
| 805 | ** table. |
| 806 | */ |
| 807 | static void process_multipart_form_data(char *z, int len){ |
| 808 | char *zLine; |
| 809 | int nArg, i; |
| 810 | char *zBoundary; |
| 811 | char *zValue; |
| 812 | char *zName = 0; |
| 813 | int showBytes = 0; |
| 814 | char *azArg[50]; |
| 815 | |
| 816 | zBoundary = get_line_from_string(&z, &len); |
| 817 | if( zBoundary==0 ) return; |
| 818 | while( (zLine = get_line_from_string(&z, &len))!=0 ){ |
| 819 | if( zLine[0]==0 ){ |
| 820 | int nContent = 0; |
| 821 | zValue = get_bounded_content(&z, &len, zBoundary, &nContent); |
| 822 | if( zName && zValue ){ |
| 823 | if( fossil_islower(zName[0]) ){ |
| 824 | cgi_set_parameter_nocopy(zName, zValue, 1); |
| 825 | if( showBytes ){ |
| 826 | cgi_set_parameter_nocopy(mprintf("%s:bytes", zName), |
| 827 |
+1
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1686,11 +1686,11 @@ | ||
| 1686 | 1686 | @ <meta name="viewport" \ |
| 1687 | 1687 | @ content="width=device-width, initial-scale=1.0"> |
| 1688 | 1688 | @ </head><body> |
| 1689 | 1689 | @ <h1>Not Found</h1> |
| 1690 | 1690 | @ </body> |
| 1691 | - cgi_set_status(404, "not found"); | |
| 1691 | + cgi_set_status(404, "Not Found"); | |
| 1692 | 1692 | cgi_reply(); |
| 1693 | 1693 | } |
| 1694 | 1694 | return; |
| 1695 | 1695 | } |
| 1696 | 1696 | break; |
| 1697 | 1697 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1686,11 +1686,11 @@ | |
| 1686 | @ <meta name="viewport" \ |
| 1687 | @ content="width=device-width, initial-scale=1.0"> |
| 1688 | @ </head><body> |
| 1689 | @ <h1>Not Found</h1> |
| 1690 | @ </body> |
| 1691 | cgi_set_status(404, "not found"); |
| 1692 | cgi_reply(); |
| 1693 | } |
| 1694 | return; |
| 1695 | } |
| 1696 | break; |
| 1697 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1686,11 +1686,11 @@ | |
| 1686 | @ <meta name="viewport" \ |
| 1687 | @ content="width=device-width, initial-scale=1.0"> |
| 1688 | @ </head><body> |
| 1689 | @ <h1>Not Found</h1> |
| 1690 | @ </body> |
| 1691 | cgi_set_status(404, "Not Found"); |
| 1692 | cgi_reply(); |
| 1693 | } |
| 1694 | return; |
| 1695 | } |
| 1696 | break; |
| 1697 |