- ASSOC_STRING("requestMethod", STR_PTR(msg->http.info.request.method));
- ASSOC_STRING("requestUrl", STR_PTR(msg->http.info.request.url));
+ ASSOC_STRING("requestMethod", STR_PTR(obj->message->http.info.request.method));
+ if (obj->message->http.info.request.url) {
+ php_http_url_to_string(obj->message->http.info.request.url, &url_str, &url_len, 0);
+ ASSOC_STRINGL_EX("requestUrl", url_str, url_len, 0);
+ } else {
+ ASSOC_STRINGL("requestUrl", "", 0);
+ }
+