Diff for /parser3/src/main/pa_http.C between versions 1.48 and 1.49

version 1.48, 2010/10/16 22:24:20 version 1.49, 2010/10/28 22:40:25
Line 521  File_read_http_result pa_internal_file_r Line 521  File_read_http_result pa_internal_file_r
         File_read_http_result result;          File_read_http_result result;
         char host[MAX_STRING];          char host[MAX_STRING];
         const char* uri;           const char* uri; 
         short port;          short port=80;
         const char* method="GET";          const char* method="GET";
         bool method_is_get=true;          bool method_is_get=true;
         HashStringValue* form=0;          HashStringValue* form=0;
Line 641  File_read_http_result pa_internal_file_r Line 641  File_read_http_result pa_internal_file_r
                 char* host_uri=lsplit(host, '/');                  char* host_uri=lsplit(host, '/');
                 uri=host_uri?current+(host_uri-1-host):"/";                  uri=host_uri?current+(host_uri-1-host):"/";
                 char* port_cstr=lsplit(host, ':');                  char* port_cstr=lsplit(host, ':');
                 char* error_pos=0;                  
                 port=port_cstr?(short)strtol(port_cstr, &error_pos, 0):80;                  if (port_cstr){
                           char* error_pos=0;
                           port=(short)strtol(port_cstr, &error_pos, 10);
                           if(port==0 || *error_pos)
                                   throw Exception(PARSER_RUNTIME, &connect_string, "invalid port number '%s'", port_cstr);
                   }
   
                 // making request head                  // making request head
                 String head;                  String head;
Line 650  File_read_http_result pa_internal_file_r Line 655  File_read_http_result pa_internal_file_r
                 if(method_is_get && form)                  if(method_is_get && form)
                         head << (strchr(uri, '?')!=0?"&":"?") << pa_form2string(*form, r.charsets);                          head << (strchr(uri, '?')!=0?"&":"?") << pa_form2string(*form, r.charsets);
   
                 head <<" HTTP/1.0" CRLF "Host: "<< host << CRLF;                  head <<" HTTP/1.0" CRLF "Host: "<< host;
                   if (port != 80)
                           head << ":" << port_cstr;
                   head << CRLF;
   
                 char* boundary=0;                  char* boundary=0;
   

Removed from v.1.48  
changed lines
  Added in v.1.49


E-mail: