Fossil SCM

Fix typos.

ashepilko 2020-03-26 03:01 trunk
Commit 58f00d333ac3fb6f78a8d4e49bd4290f8a82ebc0472a17451d5eefe1cea57850
2 files changed +11 -11 +1 -1
+11 -11
--- src/cgi.c
+++ src/cgi.c
@@ -711,36 +711,36 @@
711711
return z;
712712
}
713713
714714
/*
715715
** 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
718718
** in *pz.
719719
**
720720
** This routine adds a "\000" to the end of the content (overwriting
721721
** 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.
723723
** The length of the content is stored in *pnContent.
724724
*/
725725
static char *get_bounded_content(
726726
char **pz, /* Content taken from here */
727727
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 */
729729
int *pnContent /* Write the size of the content here */
730730
){
731731
char *z = *pz;
732732
int len = *pLen;
733733
int i;
734
- int nBoundry = strlen(zBoundry);
734
+ int nBoundary = strlen(zBoundary);
735735
*pnContent = len;
736736
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 ){
738738
if( i>0 && z[i-1]=='\r' ) i--;
739739
z[i] = 0;
740740
*pnContent = i;
741
- i += nBoundry;
741
+ i += nBoundary;
742742
break;
743743
}
744744
}
745745
*pz = &z[i];
746746
get_line_from_string(pz, pLen);
@@ -805,22 +805,22 @@
805805
** table.
806806
*/
807807
static void process_multipart_form_data(char *z, int len){
808808
char *zLine;
809809
int nArg, i;
810
- char *zBoundry;
810
+ char *zBoundary;
811811
char *zValue;
812812
char *zName = 0;
813813
int showBytes = 0;
814814
char *azArg[50];
815815
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;
818818
while( (zLine = get_line_from_string(&z, &len))!=0 ){
819819
if( zLine[0]==0 ){
820820
int nContent = 0;
821
- zValue = get_bounded_content(&z, &len, zBoundry, &nContent);
821
+ zValue = get_bounded_content(&z, &len, zBoundary, &nContent);
822822
if( zName && zValue ){
823823
if( fossil_islower(zName[0]) ){
824824
cgi_set_parameter_nocopy(zName, zValue, 1);
825825
if( showBytes ){
826826
cgi_set_parameter_nocopy(mprintf("%s:bytes", zName),
827827
--- 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 @@
16861686
@ <meta name="viewport" \
16871687
@ content="width=device-width, initial-scale=1.0">
16881688
@ </head><body>
16891689
@ <h1>Not Found</h1>
16901690
@ </body>
1691
- cgi_set_status(404, "not found");
1691
+ cgi_set_status(404, "Not Found");
16921692
cgi_reply();
16931693
}
16941694
return;
16951695
}
16961696
break;
16971697
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button