diff options
Diffstat (limited to 'ext/soap/php_http.c')
-rw-r--r-- | ext/soap/php_http.c | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index f61c5f2872..1ebb59d3cb 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -62,7 +62,9 @@ void send_http_soap_request(zval *this_ptr, xmlDoc *doc, char *function_name, ch } else php_error(E_ERROR,"Could not connect to host"); - //php_url_free(phpurl); + /* + php_url_free(phpurl); + */ } if(stream) @@ -71,10 +73,10 @@ void send_http_soap_request(zval *this_ptr, xmlDoc *doc, char *function_name, ch char *header = "POST %s HTTP/1.1\r\nConnection: close\r\nAccept: text/html; text/xml; text/plain\r\nUser-Agent: PHP SOAP 0.1\r\nHost: %s\r\nContent-Type: text/xml\r\nContent-Length: %d\r\nSOAPAction: \"%s\"\r\n"; int size = strlen(header) + strlen(phpurl->host) + strlen(phpurl->path) + 10; - // TODO: Add authication + /* TODO: Add authentication */ if(sdl != NULL) { - // TODO: need to grab soap action from wsdl.... + /* TODO: need to grab soap action from wsdl....*/ soap_headers = emalloc(size + strlen(soapaction)); sprintf(soap_headers, header, phpurl->path, phpurl->host, buf_size, soapaction); } @@ -92,7 +94,7 @@ void send_http_soap_request(zval *this_ptr, xmlDoc *doc, char *function_name, ch if(err != (int)strlen(soap_headers)) php_error(E_ERROR,"Failed Sending HTTP Headers"); - // Send cookies along with request + /* Send cookies along with request */ if(zend_hash_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies"), (void **)&cookies) == SUCCESS) { smart_str cookie_str = {0}; @@ -170,7 +172,7 @@ void get_http_soap_response(zval *this_ptr, char **buffer, int *buffer_len TSRML if(!get_http_headers(stream, &http_headers, &http_header_size TSRMLS_CC)) php_error(E_ERROR, "Error Fetching http headers"); - //Check to see what HTTP status was sent + /* Check to see what HTTP status was sent */ http_version = get_http_header_value(http_headers,"HTTP/"); if(http_version) { @@ -205,7 +207,7 @@ void get_http_soap_response(zval *this_ptr, char **buffer, int *buffer_len TSRML return; }*/ - //Try and get headers again + /* Try and get headers again */ if(!strcmp(http_status, "100")) { if(!get_http_headers(stream, &http_headers, &http_header_size TSRMLS_CC)) @@ -222,9 +224,10 @@ void get_http_soap_response(zval *this_ptr, char **buffer, int *buffer_len TSRML && Z_LVAL_PP(trace) > 0) add_property_stringl(this_ptr, "__last_response", http_body, http_body_size, 1); - // Close every time right now till i can spend more time on it - // it works.. it's just slower?? - //See if the server requested a close + /* Close every time right now till i can spend more time on it + it works.. it's just slower?? + */ + /* See if the server requested a close */ http_close = TRUE; /* connection = get_http_header_value(http_headers,"Connection: "); @@ -252,7 +255,7 @@ void get_http_soap_response(zval *this_ptr, char **buffer, int *buffer_len TSRML zend_hash_del(Z_OBJPROP_P(this_ptr), "httpsocket", strlen("httpsocket") + 1); } - //Check and see if the server even sent a xml document + /* Check and see if the server even sent a xml document */ content_type = get_http_header_value(http_headers,"Content-Type: "); if(content_type) { @@ -279,10 +282,12 @@ void get_http_soap_response(zval *this_ptr, char **buffer, int *buffer_len TSRML efree(content_type); } - //Grab and send back every cookie - //Not going to worry about Path: because - //we shouldn't be changing urls so path dont - //matter too much + /* Grab and send back every cookie */ + + /* Not going to worry about Path: because + we shouldn't be changing urls so path dont + matter too much + */ cookie_itt = strstr(http_headers,"Set-Cookie: "); while(cookie_itt) { @@ -355,8 +360,9 @@ int get_http_body(SOAP_STREAM stream, char *headers, char **response, int *out_ trans_enc = get_http_header_value(headers, "Transfer-Encoding: "); content_length = get_http_header_value(headers, "Content-Length: "); - //this is temp... - // netscape enterprise server sends in lowercase??? + /* this is temp... + netscape enterprise server sends in lowercase??? + */ if(content_length == NULL) content_length = get_http_header_value(headers, "Content-length: "); @@ -393,7 +399,7 @@ int get_http_body(SOAP_STREAM stream, char *headers, char **response, int *out_ #ifdef PHP_STREAMS php_stream_getc(stream);php_stream_getc(stream); #else - //Eat up '\r' '\n' + /* Eat up '\r' '\n' */ php_sock_fgetc(stream);php_sock_fgetc(stream); #endif } |