|
|
| version 1.38, 2009/09/03 11:08:18 | version 1.42, 2009/09/10 10:01:45 |
|---|---|
| Line 322 static void http_pass_header(HashStringV | Line 322 static void http_pass_header(HashStringV |
| HashStringValue::value_type avalue, | HashStringValue::value_type avalue, |
| Http_pass_header_info *info) { | Http_pass_header_info *info) { |
| String name=String(aname, String::L_URI); | const char* name_cstr=aname.cstr(); |
| const char* name_cstr=name.cstr(); | |
| String name=String(capitalize(name_cstr), String::L_URI); | |
| if(strcasecmp(name_cstr, HTTP_CONTENT_LENGTH)==0) | if(strcasecmp(name_cstr, HTTP_CONTENT_LENGTH)==0) |
| return; | return; |
| String value=attributed_meaning_to_string(*avalue, String::L_URI, false); | String value=attributed_meaning_to_string(*avalue, String::L_URI, true); |
| *info->request << name << ": " << value << CRLF; | *info->request << name << ": " << value << CRLF; |
| Line 417 struct FormPart { | Line 418 struct FormPart { |
| static void form_part_boundary_header(FormPart& part, String::Body name, const char* file_name=0){ | static void form_part_boundary_header(FormPart& part, String::Body name, const char* file_name=0){ |
| part.string << "--" << part.boundary | part.string << "--" << part.boundary |
| << CRLF CONTENT_DISPOSITION ": form-data; name=\"" | << CRLF CONTENT_DISPOSITION_CAPITALIZED ": form-data; name=\"" |
| << Charset::transcode(name, part.r->charsets.source(), part.r->charsets.client()) | << Charset::transcode(name, part.r->charsets.source(), part.r->charsets.client()) |
| << "\""; | << "\""; |
| if(file_name){ | if(file_name){ |
| if(strcmp(file_name, NONAME_DAT)!=0) | if(strcmp(file_name, NONAME_DAT)!=0) |
| part.string << "; filename=\"" << file_name << "\""; | part.string << "; filename=\"" << file_name << "\""; |
| part.string << CRLF HTTP_CONTENT_TYPE ": " << part.r->mime_type_of(file_name); | part.string << CRLF HTTP_CONTENT_TYPE_CAPITALIZED ": " << part.r->mime_type_of(file_name); |
| } | } |
| part.string << CRLF CRLF; | part.string << CRLF CRLF; |
| } | } |
| Line 579 File_read_http_result pa_internal_file_r | Line 580 File_read_http_result pa_internal_file_r |
| if(valid_options!=options->count()) | if(valid_options!=options->count()) |
| throw Exception(PARSER_RUNTIME, | throw Exception(PARSER_RUNTIME, |
| 0, | 0, |
| "invalid option passed"); | INVALID_OPTION_PASSED); |
| } | } |
| if(!asked_remote_charset) // defaulting to $request:charset | if(!asked_remote_charset) // defaulting to $request:charset |
| asked_remote_charset=&(r.charsets).source(); | asked_remote_charset=&(r.charsets).source(); |
| Line 736 File_read_http_result pa_internal_file_r | Line 737 File_read_http_result pa_internal_file_r |
| head << "Content-Length: " << format(post_size, "%u") << CRLF; | head << "Content-Length: " << format(post_size, "%u") << CRLF; |
| // head + end of header | // head + end of header |
| request_head_and_body << head.untaint_cstr(String::L_AS_IS, 0, &(r.charsets)) << CRLF; | request_head_and_body << head.transcode_and_untaint_cstr(String::L_URI, &(r.charsets)) << CRLF; |
| // body | // body |
| if(body_cstr) | if(body_cstr) |