dish/src/dish.cxx
//------------------------------------------------------------------------------------------
// This static helper function will read a key name from the HTTP MIME-header line
//------------------------------------------------------------------------------------------
This static helper function will read a key name from the HTTP MIME-header line
This static helper function will read a key name from the HTTP MIME - header line
static char* GetKey(char* str) {
    static char key[1024];
    int j = 0;
    for(int i = 0; i<1023; i++) {
        if(str[i]==0)   break;
        if(str[i]==':') break;
        key[j++]=str[i];
    }
    while(j>0 && key[j-1]==' ') j--;
    key[j]=0;
    return key;
}
static char * GetKey ( char * str ) { static char key [ 1024 ] ; int j = 0 ; for ( int i = 0 ; i < 1023 ; i ++ ) { if ( str [ i ] == 0 ) break ; if ( str [ i ] == ' ' ) break ; key [ j ++ ] = str [ i ] ; } while ( j > 0 && key [ j - 1 ] == ' ' ) j -- ; key [ j ] = 0 ; return key ; }
This static helper function will read a key name from the HTTP MIME-header line
This static helper function will read a key name from the HTTP MIME - header line