--- parser3/src/main/pa_http.C 2016/07/26 15:22:36 1.73 +++ parser3/src/main/pa_http.C 2016/09/08 20:41:47 1.76 @@ -13,7 +13,7 @@ #include "pa_vfile.h" #include "pa_random.h" -volatile const char * IDENT_PA_HTTP_C="$Id: pa_http.C,v 1.73 2016/07/26 15:22:36 moko Exp $" IDENT_PA_HTTP_H; +volatile const char * IDENT_PA_HTTP_C="$Id: pa_http.C,v 1.76 2016/09/08 20:41:47 moko Exp $" IDENT_PA_HTTP_H; #ifdef _MSC_VER #include @@ -117,8 +117,7 @@ static int http_read_response(char*& res if(char* EOLat=strstr(preview_buf, "\n")) { const String status_line(pa_strdup(preview_buf, EOLat-preview_buf)); ArrayString astatus; - size_t pos_after=0; - status_line.split(astatus, pos_after, " "); + status_line.split(astatus, 0, " "); const String& status_code=*astatus.get(astatus.count()>1?1:0); result=status_code.as_int(); @@ -567,7 +566,7 @@ Table* parse_cookies(Request& r, Table * return &result; } -void *tables_update(HashStringValue& tables, const String::Body name, const String& value){ +void tables_update(HashStringValue& tables, const String::Body name, const String& value){ Table *table; if(Value *valready=tables.get(name)) { // second+ appearence @@ -646,11 +645,11 @@ File_read_http_result pa_internal_file_r omit_post_charset=vomit_post_charset->as_bool(); } if(Value* vcharset_name=options->get(PA_CHARSET_NAME)) { - asked_remote_charset=&charsets.get(vcharset_name->as_string().change_case(r.charsets.source(), String::CC_UPPER)); + asked_remote_charset=&charsets.get(vcharset_name->as_string()); } if(Value* vresponse_charset_name=options->get(PA_RESPONSE_CHARSET_NAME)) { valid_options++; - real_remote_charset=&charsets.get(vresponse_charset_name->as_string().change_case(r.charsets.source(), String::CC_UPPER)); + real_remote_charset=&charsets.get(vresponse_charset_name->as_string()); } if(Value* vuser=options->get(HTTP_USER)) { valid_options++; @@ -839,9 +838,7 @@ File_read_http_result pa_internal_file_r const String header_block(String::C(response_str, headers_end_at-response_str), String::L_TAINTED); ArrayString aheaders; - - size_t pos_after=0; - header_block.split(aheaders, pos_after, "\n"); + header_block.split(aheaders, 0, "\n"); Array_iterator i(aheaders); i.next(); // skipping status