- fix copyright year
[m6w6/ext-http] / http_message_object.c
index f1768b6adc339e5e80945288047460e24f67795a..fd33e32b39c5eb6b2479dece835e074b9c2d63c0 100644 (file)
@@ -6,7 +6,7 @@
     | modification, are permitted provided that the conditions mentioned |
     | in the accompanying LICENSE file are met.                          |
     +--------------------------------------------------------------------+
-    | Copyright (c) 2004-2006, Michael Wallner <mike@php.net>            |
+    | Copyright (c) 2004-2007, Michael Wallner <mike@php.net>            |
     +--------------------------------------------------------------------+
 */
 
@@ -909,10 +909,10 @@ PHP_METHOD(HttpMessage, getInfo)
                
                switch (obj->message->type) {
                        case HTTP_MSG_REQUEST:
-                               Z_STRLEN_P(return_value) = spprintf(&Z_STRVAL_P(return_value), 0, "%s %s HTTP/%0.1f", obj->message->http.info.request.method, obj->message->http.info.request.url, obj->message->http.version);
+                               Z_STRLEN_P(return_value) = spprintf(&Z_STRVAL_P(return_value), 0, HTTP_INFO_REQUEST_FMT_ARGS(&obj->message->http, ""));
                                break;
                        case HTTP_MSG_RESPONSE:
-                               Z_STRLEN_P(return_value) = spprintf(&Z_STRVAL_P(return_value), 0, "HTTP/%0.1f %d %s", obj->message->http.version, obj->message->http.info.response.code, obj->message->http.info.response.status);
+                               Z_STRLEN_P(return_value) = spprintf(&Z_STRVAL_P(return_value), 0, HTTP_INFO_RESPONSE_FMT_ARGS(&obj->message->http, ""));
                                break;
                        default:
                                RETURN_NULL();