From ee9aa83b4b377ab5e18eeff6612f7ab15b3ecf3f Mon Sep 17 00:00:00 2001 From: goodale Date: Mon, 17 May 2004 12:28:56 +0000 Subject: Untabified. Please try to adhere to the Cactus coding guidelines when modifying or adding files. git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@206 1faa4e14-9dd3-4be0-9f0e-ffe519881164 --- src/Content.c | 40 +++--- src/Cookies.c | 4 +- src/Groups.c | 46 +++---- src/Headers.c | 46 +++---- src/Parameters.c | 34 +++--- src/SStringHTML.c | 26 ++-- src/Steer.c | 2 +- src/Thorns.c | 6 +- src/base64.c | 360 +++++++++++++++++++++++++++--------------------------- src/http.c | 4 +- 10 files changed, 284 insertions(+), 284 deletions(-) diff --git a/src/Content.c b/src/Content.c index 1e0c647..cbb4279 100644 --- a/src/Content.c +++ b/src/Content.c @@ -447,7 +447,7 @@ static int MainPage(const cGH *cctkGH, httpRequest *request, void *data) "

"); Concat(message, title ); ConcatCString(message, - "

\n" + "\n" "

This browser is connected to a Cactus simulation which \n" "contains a web server thorn. This thorn provides information \n" " and control for the simulation.

\n" @@ -460,7 +460,7 @@ static int MainPage(const cGH *cctkGH, httpRequest *request, void *data) "\n" "\n" "\n" - "\n"); + "\n"); HTTP_SendString(request, message ); @@ -505,15 +505,15 @@ static int MainPage(const cGH *cctkGH, httpRequest *request, void *data) "
  • Flesh version "); ConcatCString(message, CCTK_FullVersion() ); ConcatCString(message, - "
  • \n" + "\n" "
  • Flesh compiled on "); ConcatCString(message, CCTK_CompileDate() ); ConcatCString(message, - "\n" + "\n" " at "); ConcatCString(message, CCTK_CompileTime() ); ConcatCString(message, - "
  • \n"); + "\n"); HTTP_SendString(request, message ); @@ -667,7 +667,7 @@ static int MainPage(const cGH *cctkGH, httpRequest *request, void *data) SetToCString(message, "
  • Multiprocessor run on " ); ConcatDecimal(message, CCTK_nProcs(cctkGH)); ConcatCString(message, " CPUs
  • \n" - "
  • Processor 0 running on "); + "
  • Processor 0 running on "); ConcatCString(message, host); ConcatCString(message, "
  • \n"); } @@ -878,7 +878,7 @@ static int ControlPage(const cGH *cctkGH, httpRequest *request, void *data) HTTP_Send(request, "

    Run Control

    \n" "

    Select if the run should be paused, running normally, " - "or terminated.\n" + "or terminated.\n" " You may also single step to the next iteration.

    \n"); HTTP_Send(request, @@ -889,36 +889,36 @@ static int ControlPage(const cGH *cctkGH, httpRequest *request, void *data) " PAUSE\n"); + " value=\"PAUSE\" /> PAUSE\n"); HTTP_SendString(request, message); SetToCString(message, " RUN\n"); + " value=\"RUN\" /> RUN\n"); HTTP_SendString(request, message); HTTP_Send(request, " TERMINATE\n"); + "value=\"TERMINATE\" /> TERMINATE\n"); HTTP_Send(request, "\n"); + "value=\"STEP\" />\n"); HTTP_Send(request, "\n" "\n" "\n" - "\n" + "\n" "\n" "
    \n"); HTTP_Send(request, "

    Run Until

    \n" "

    The following parameters allow you to select an iteration\n" - "number or physical time at which the code will pause.\n" + "number or physical time at which the code will pause.\n" " You may also choose to pause if a particular expression made up\n" " of grid scalars, simulation time and iteration is true. \n" " Note that even if 'run' is selected above, the settings here have" @@ -931,33 +931,33 @@ static int ControlPage(const cGH *cctkGH, httpRequest *request, void *data) "\n" + "\" name=\"iteration\" />\n" "\n" + " name=\"until_it_active\" />\n" "\n"); ConcatCString(message, "Time" "\n" + "\" name=\"time\" />\n" "\n" + " name=\"until_time_active\" />\n" "\n"); ConcatCString(message, "Expression\n" "\n" + "\" name=\"expression\" />\n" "\n" + " name=\"until_expression_active\" />\n" "\n"); ConcatCString(message,"\n"); @@ -1228,7 +1228,7 @@ static int ControlTerminationPage(const cGH *cctkGH, httpRequest *request) ConcatCString(message, "\n" "

  • Flesh compiled on " __DATE__" \n" - "at "__TIME__"
  • \n"); + "at "__TIME__" \n"); HTTP_SendString(request, message); diff --git a/src/Cookies.c b/src/Cookies.c index c153608..0558006 100644 --- a/src/Cookies.c +++ b/src/Cookies.c @@ -177,12 +177,12 @@ char *HTTP_CookieGet(httpRequest *request, const char *cookie_name) && position == 0 ) { if( FindCharFrom( value, '=', &position ) - && position == Length( name ) ) + && position == Length( name ) ) { TrimLeading( value, position + 1 ); retval = Util_Strdup( GetBuffer( value ) ); } - break; + break; } } String_Delete(name); diff --git a/src/Groups.c b/src/Groups.c index 5ee0453..16624cb 100644 --- a/src/Groups.c +++ b/src/Groups.c @@ -115,9 +115,9 @@ static int GroupsPage(const cGH *cctkGH, httpRequest *request, void *data) HTTP_SendString(request, message ); HTTP_Send(request,"\n"); + "\ttable.groups { background-color: #E9F4D3; } \n" + "\t\t.groups td { text-align: left; } \n" + "\n"); HTTP_Send(request,"\n\n"); @@ -130,33 +130,33 @@ static int GroupsPage(const cGH *cctkGH, httpRequest *request, void *data) ngroups = CCTK_NumGroups(); retval = HTTP_Send(request, "

    Groups and Grid Variables

    \n" - "

    These pages describe the grid variables and groups \n" - "active in this simulation.

    \n"); + "

    These pages describe the grid variables and groups \n" + "active in this simulation.

    \n"); SetToCString(message, - "

    This simulation contains "); + "

    This simulation contains "); ConcatDecimal(message, CCTK_NumGroups()); ConcatCString(message, - " groups, and "); + " groups, and "); ConcatDecimal(message, CCTK_NumVars()); ConcatCString(message, - " variables, " - "set in "); + " variables, " + "set in "); ConcatDecimal(message, CCTK_MaxDim()); ConcatCString(message, - "-space dimensions. \nGroups for which storage is currently\n" - "assigned are written in red. \n" - "The numbers in square brackets are the group and variable indices." - "

    \n"); + "-space dimensions. \nGroups for which storage is currently\n" + "assigned are written in red. \n" + "The numbers in square brackets are the group and variable indices." + "

    \n"); retval = HTTP_SendString(request, message); retval = HTTP_Send(request,"
    \n"); retval = HTTP_Send(request,"
    \n" "\n" - "" - "\n"); + "cellspacing=\"5\">\n" + "" + "\n"); for(i=0; i < ngroups; i++) { @@ -193,16 +193,16 @@ static int GroupsPage(const cGH *cctkGH, httpRequest *request, void *data) switch (CCTK_GroupTypeI(i)) { case CCTK_SCALAR: - ConcatCString(message,"Grid scalar"); - break; + ConcatCString(message,"Grid scalar"); + break; case CCTK_ARRAY: - ConcatCString(message,"Grid array"); - break; + ConcatCString(message,"Grid array"); + break; case CCTK_GF: - ConcatCString(message,"Grid function"); - break; + ConcatCString(message,"Grid function"); + break; } - + ConcatCString(message, " " ); ConcatCString(message, CCTK_VarTypeName(gdata.vartype) ); ConcatCString(message, "
    \n("); diff --git a/src/Headers.c b/src/Headers.c index f24ac49..cf92f45 100644 --- a/src/Headers.c +++ b/src/Headers.c @@ -49,31 +49,31 @@ struct httpLink static const char *cactus_styles = "\n"; static const char *cactus_footer = diff --git a/src/Parameters.c b/src/Parameters.c index 3348494..55f0e98 100644 --- a/src/Parameters.c +++ b/src/Parameters.c @@ -216,17 +216,17 @@ static int MainParameterPage(const cGH *cctkGH, httpRequest *request, void *data HTTP_Send(request, "

    Check/Modify Parameters

    \n" "

    From this page you can check the values of all parameters for \n" - "the simulation, and modify any parameters which have been \n" - "designated as steerable

    \n" + "the simulation, and modify any parameters which have been \n" + "designated as steerable

    \n" "

    Parameters can be viewed for all Active Thorns, that is,\n" "for thorns which have been activated in the parameter file for the\n" " simulation. \n" "Select one of the active thorns for this simulation from the list \n" - "below to view all of its parameters

    \n" + "below to view all of its parameters

    \n" "

    Steerable parameters can be identified by the presence of a \n" - "form input box, to change the value of a parameter, simply edit \n" - "the value in the box and press the submit button to register the \n" - "new values.

    \n" + "form input box, to change the value of a parameter, simply edit \n" + "the value in the box and press the submit button to register the \n" + "new values.

    \n" "
    \n" "
    GroupsGroup PropertiesVariables
    GroupsGroup PropertiesVariables
    \n" "\n"); @@ -313,10 +313,10 @@ static int ThornParameterPage(const cGH *cctkGH, httpRequest *request, void *dat { first = 0; fprintf(stderr, "Setting %s::%s to %s\n", thorn, - HTTP_ArgName( argument), - HTTP_ArgValue( argument )); + HTTP_ArgName( argument), + HTTP_ArgValue( argument )); HTTP_SteerQueue(thorn, HTTP_ArgName( argument), - HTTP_ArgValue( argument )); + HTTP_ArgValue( argument )); } } SendHTTP_Redirect_Header( request ); @@ -401,7 +401,7 @@ static int ThornParameterPage(const cGH *cctkGH, httpRequest *request, void *dat "

    Thorn "); ConcatCString(message, thorn); ConcatCString(message, - "

    \n"); + "\n"); ConcatCString(message, "

    Parameters in Cactus can be either fixed or steerable. \n" "Steerable parameters are those which can be modified during a simulation.\n" @@ -700,7 +700,7 @@ static int ParameterPage(const cGH *cctkGH, httpRequest *request, void *data) char *value; char user[USER_LENGTH+1] = EMPTYSTRING; int notauthorised = HTTP_AuthenticateBasic(request, "user", user, - USER_LENGTH); + USER_LENGTH); int readonly = notauthorised; if(HTTP_NumArguments( request ) > 0) @@ -718,10 +718,10 @@ static int ParameterPage(const cGH *cctkGH, httpRequest *request, void *data) { first = 0; fprintf(stderr, "Setting %s::%s to %s\n", pData->thorn, - HTTP_ArgName( argument), - HTTP_ArgValue( argument )); + HTTP_ArgName( argument), + HTTP_ArgValue( argument )); HTTP_SteerQueue(pData->thorn, HTTP_ArgName( argument), - HTTP_ArgValue( argument )); + HTTP_ArgValue( argument )); } } SendHTTP_Redirect_Header( request ); @@ -799,9 +799,9 @@ static int ParameterPage(const cGH *cctkGH, httpRequest *request, void *data) "

    "); + "\">thorn. "); HTTP_SendString(request, message); @@ -815,7 +815,7 @@ static int ParameterPage(const cGH *cctkGH, httpRequest *request, void *data) { SetToCString(message,"
    \n" - "
    Thorn NameImplementation
    \n" ); ConcatCString(message, "\n\n
    Name:"); ConcatCString(message, pData->name); diff --git a/src/SStringHTML.c b/src/SStringHTML.c index 42a317b..d75cf48 100644 --- a/src/SStringHTML.c +++ b/src/SStringHTML.c @@ -14,27 +14,27 @@ StringReplaceCharWithCString( String * str, SSCHAR c, const SSCHAR *cstr ); String * StringSetToEncodedHTMLCString( String * str, const SSCHAR *c ) { - return StringEncodeHTML( StringSetToCString( str, c ) ); + return StringEncodeHTML( StringSetToCString( str, c ) ); } String * StringEncodeHTML( String * str ) { - StringReplaceCharWithCString( str, '&', "&" ); - StringReplaceCharWithCString( str, '<', "<" ); - StringReplaceCharWithCString( str, '>', ">" ); - return str; + StringReplaceCharWithCString( str, '&', "&" ); + StringReplaceCharWithCString( str, '<', "<" ); + StringReplaceCharWithCString( str, '>', ">" ); + return str; } String * StringReplaceCharWithCString( String * str, SSCHAR c, const SSCHAR *cstr ) { - size_t position = 0; - while( StringFindCharFrom( str, c, &position ) ) - { - StringDeleteChar( str, position ); - StringInsertCString( str, cstr, position ); - position ++; - } - return str; + size_t position = 0; + while( StringFindCharFrom( str, c, &position ) ) + { + StringDeleteChar( str, position ); + StringInsertCString( str, cstr, position ); + position ++; + } + return str; } diff --git a/src/Steer.c b/src/Steer.c index ed87922..e474325 100644 --- a/src/Steer.c +++ b/src/Steer.c @@ -374,7 +374,7 @@ static void ByteSwap(void *buf,int nelements,int elementsize) /* do the swap thing on each element */ for(s=0, d=elementsize-1; s < d; s++,d--) { - char c=buffer[s]; + char c=buffer[s]; buffer[s]=buffer[d]; buffer[d]=c; } diff --git a/src/Thorns.c b/src/Thorns.c index 99fe222..a0720bb 100644 --- a/src/Thorns.c +++ b/src/Thorns.c @@ -132,8 +132,8 @@ static int ThornMainPage(const cGH *cctkGH, httpRequest *request, void *data) HTTP_SendString(request, message ); HTTP_Send(request,"\n"); + "\t.thorns td { text-align: left; } \n" + "\n"); HTTP_Send(request,"\n\n"); /* HTTP_SendString out the header part. */ @@ -194,7 +194,7 @@ static int ThornMainPage(const cGH *cctkGH, httpRequest *request, void *data) HTTP_Send(request, "

    Dormant Thorns

    \n" "
    \n" - "\n" + "
    \n" "\n" "\n" "\n" diff --git a/src/base64.c b/src/base64.c index f209acf..bd09102 100644 --- a/src/base64.c +++ b/src/base64.c @@ -63,7 +63,7 @@ #include "base64.h" static const char Base64[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; static const char Pad64 = '='; /* (From RFC1521 and draft-ietf-dnssec-secext-03.txt) @@ -119,75 +119,75 @@ static const char Pad64 = '='; (1) the final quantum of encoding input is an integral multiple of 24 bits; here, the final unit of encoded - output will be an integral multiple of 4 characters - with no "=" padding, + output will be an integral multiple of 4 characters + with no "=" padding, (2) the final quantum of encoding input is exactly 8 bits; here, the final unit of encoded output will be two - characters followed by two "=" padding characters, or + characters followed by two "=" padding characters, or (3) the final quantum of encoding input is exactly 16 bits; here, the final unit of encoded output will be three - characters followed by one "=" padding character. + characters followed by one "=" padding character. */ int HTTP_b64_ntop(unsigned char *src, size_t srclength, char *target, size_t targsize) { - size_t datalength = 0; - unsigned char input[3]; - unsigned char output[4]; - size_t i; - - while (2 < srclength) { - input[0] = *src++; - input[1] = *src++; - input[2] = *src++; - srclength -= 3; - - output[0] = input[0] >> 2; - output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); - output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); - output[3] = input[2] & 0x3f; - Assert(output[0] < 64); - Assert(output[1] < 64); - Assert(output[2] < 64); - Assert(output[3] < 64); - - if (datalength + 4 > targsize) - return (-1); - target[datalength++] = Base64[output[0]]; - target[datalength++] = Base64[output[1]]; - target[datalength++] = Base64[output[2]]; - target[datalength++] = Base64[output[3]]; - } - - /* Now we worry about padding. */ - if (0 != srclength) { - /* Get what's left. */ - input[0] = input[1] = input[2] = '\0'; - for (i = 0; i < srclength; i++) - input[i] = *src++; - - output[0] = input[0] >> 2; - output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); - output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); - Assert(output[0] < 64); - Assert(output[1] < 64); - Assert(output[2] < 64); - - if (datalength + 4 > targsize) - return (-1); - target[datalength++] = Base64[output[0]]; - target[datalength++] = Base64[output[1]]; - if (srclength == 1) - target[datalength++] = Pad64; - else - target[datalength++] = Base64[output[2]]; - target[datalength++] = Pad64; - } - if (datalength >= targsize) - return (-1); - target[datalength] = '\0'; /* Returned value doesn't count \0. */ - return (datalength); + size_t datalength = 0; + unsigned char input[3]; + unsigned char output[4]; + size_t i; + + while (2 < srclength) { + input[0] = *src++; + input[1] = *src++; + input[2] = *src++; + srclength -= 3; + + output[0] = input[0] >> 2; + output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); + output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); + output[3] = input[2] & 0x3f; + Assert(output[0] < 64); + Assert(output[1] < 64); + Assert(output[2] < 64); + Assert(output[3] < 64); + + if (datalength + 4 > targsize) + return (-1); + target[datalength++] = Base64[output[0]]; + target[datalength++] = Base64[output[1]]; + target[datalength++] = Base64[output[2]]; + target[datalength++] = Base64[output[3]]; + } + + /* Now we worry about padding. */ + if (0 != srclength) { + /* Get what's left. */ + input[0] = input[1] = input[2] = '\0'; + for (i = 0; i < srclength; i++) + input[i] = *src++; + + output[0] = input[0] >> 2; + output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); + output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); + Assert(output[0] < 64); + Assert(output[1] < 64); + Assert(output[2] < 64); + + if (datalength + 4 > targsize) + return (-1); + target[datalength++] = Base64[output[0]]; + target[datalength++] = Base64[output[1]]; + if (srclength == 1) + target[datalength++] = Pad64; + else + target[datalength++] = Base64[output[2]]; + target[datalength++] = Pad64; + } + if (datalength >= targsize) + return (-1); + target[datalength] = '\0'; /* Returned value doesn't count \0. */ + return (datalength); } /* skips all whitespace anywhere. @@ -198,129 +198,129 @@ int HTTP_b64_ntop(unsigned char *src, size_t srclength, int HTTP_b64_pton(const char *src, unsigned char *target, size_t targsize) { - size_t tarindex; - int state, ch; - char *pos; - - state = 0; - tarindex = 0; - - while ((ch = *src++) != '\0') { - if (isspace(ch)) /* Skip whitespace anywhere. */ - continue; - - if (ch == Pad64) - break; - - pos = strchr(Base64, ch); - if (pos == 0) /* A non-base64 character. */ - return (-1); - - switch (state) { - case 0: - if (target) { - if (tarindex >= targsize) - return (-1); - target[tarindex] = (pos - Base64) << 2; - } - state = 1; - break; - case 1: - if (target) { - if (tarindex + 1 >= targsize) - return (-1); - target[tarindex] |= (pos - Base64) >> 4; - target[tarindex+1] = ((pos - Base64) & 0x0f) - << 4 ; - } - tarindex++; - state = 2; - break; - case 2: - if (target) { - if (tarindex + 1 >= targsize) - return (-1); - target[tarindex] |= (pos - Base64) >> 2; - target[tarindex+1] = ((pos - Base64) & 0x03) - << 6; - } - tarindex++; - state = 3; - break; - case 3: - if (target) { - if (tarindex >= targsize) - return (-1); - target[tarindex] |= (pos - Base64); - } - tarindex++; - state = 0; - break; - default: - abort(); - } - } - - /* - * We are done decoding Base-64 chars. Let's see if we ended - * on a byte boundary, and/or with erroneous trailing characters. - */ - - if (ch == Pad64) { /* We got a pad char. */ - ch = *src++; /* Skip it, get next. */ - switch (state) { - case 0: /* Invalid = in first position */ - case 1: /* Invalid = in second position */ - return (-1); - - case 2: /* Valid, means one byte of info */ - /* Skip any number of spaces. */ + size_t tarindex; + int state, ch; + char *pos; + + state = 0; + tarindex = 0; + + while ((ch = *src++) != '\0') { + if (isspace(ch)) /* Skip whitespace anywhere. */ + continue; + + if (ch == Pad64) + break; + + pos = strchr(Base64, ch); + if (pos == 0) /* A non-base64 character. */ + return (-1); + + switch (state) { + case 0: + if (target) { + if (tarindex >= targsize) + return (-1); + target[tarindex] = (pos - Base64) << 2; + } + state = 1; + break; + case 1: + if (target) { + if (tarindex + 1 >= targsize) + return (-1); + target[tarindex] |= (pos - Base64) >> 4; + target[tarindex+1] = ((pos - Base64) & 0x0f) + << 4 ; + } + tarindex++; + state = 2; + break; + case 2: + if (target) { + if (tarindex + 1 >= targsize) + return (-1); + target[tarindex] |= (pos - Base64) >> 2; + target[tarindex+1] = ((pos - Base64) & 0x03) + << 6; + } + tarindex++; + state = 3; + break; + case 3: + if (target) { + if (tarindex >= targsize) + return (-1); + target[tarindex] |= (pos - Base64); + } + tarindex++; + state = 0; + break; + default: + abort(); + } + } + + /* + * We are done decoding Base-64 chars. Let's see if we ended + * on a byte boundary, and/or with erroneous trailing characters. + */ + + if (ch == Pad64) { /* We got a pad char. */ + ch = *src++; /* Skip it, get next. */ + switch (state) { + case 0: /* Invalid = in first position */ + case 1: /* Invalid = in second position */ + return (-1); + + case 2: /* Valid, means one byte of info */ + /* Skip any number of spaces. */ #ifdef _LIBC - /* To avoid warnings. */ - for ( ; ch != '\0'; ch = *src++) + /* To avoid warnings. */ + for ( ; ch != '\0'; ch = *src++) #else - for (NULL; ch != '\0'; ch = *src++) + for (NULL; ch != '\0'; ch = *src++) #endif - if (!isspace(ch)) - break; - /* Make sure there is another trailing = sign. */ - if (ch != Pad64) - return (-1); - ch = *src++; /* Skip the = */ - /* Fall through to "single trailing =" case. */ - /* FALLTHROUGH */ - - case 3: /* Valid, means two bytes of info */ - /* - * We know this char is an =. Is there anything but - * whitespace after it? - */ + if (!isspace(ch)) + break; + /* Make sure there is another trailing = sign. */ + if (ch != Pad64) + return (-1); + ch = *src++; /* Skip the = */ + /* Fall through to "single trailing =" case. */ + /* FALLTHROUGH */ + + case 3: /* Valid, means two bytes of info */ + /* + * We know this char is an =. Is there anything but + * whitespace after it? + */ #ifdef _LIBC - /* To avoid warnings. */ - for ( ; ch != '\0'; ch = *src++) + /* To avoid warnings. */ + for ( ; ch != '\0'; ch = *src++) #else - for (NULL; ch != '\0'; ch = *src++) + for (NULL; ch != '\0'; ch = *src++) #endif - if (!isspace(ch)) - return (-1); - - /* - * Now make sure for cases 2 and 3 that the "extra" - * bits that slopped past the last full byte were - * zeros. If we don't check them, they become a - * subliminal channel. - */ - if (target && target[tarindex] != 0) - return (-1); - } - } else { - /* - * We ended by seeing the end of the string. Make sure we - * have no partial bytes lying around. - */ - if (state != 0) - return (-1); - } - - return (tarindex); + if (!isspace(ch)) + return (-1); + + /* + * Now make sure for cases 2 and 3 that the "extra" + * bits that slopped past the last full byte were + * zeros. If we don't check them, they become a + * subliminal channel. + */ + if (target && target[tarindex] != 0) + return (-1); + } + } else { + /* + * We ended by seeing the end of the string. Make sure we + * have no partial bytes lying around. + */ + if (state != 0) + return (-1); + } + + return (tarindex); } diff --git a/src/http.c b/src/http.c index a2e2ff1..36fcc5f 100644 --- a/src/http.c +++ b/src/http.c @@ -139,7 +139,7 @@ httpSocket * HTTP_Connection( const httpRequest *request ) } SSBOOL HTTP_GetHeaderValueString(const httpRequest *request, - const String *header, String *value) + const String *header, String *value) { const char * v = HTTP_HeaderValue(request, GetBuffer( header ) ); if( v ) @@ -752,7 +752,7 @@ static int StripArgs(httpRequest *request, char *request_uri) } /* Append to local list */ - /* SW it isn't perfecty obvious this non NULL */ + /* SW it isn't perfecty obvious this non NULL */ last->next = argument; } else -- cgit v1.2.3
    Thorn NameImplementation