summaryrefslogtreecommitdiff
path: root/request.c
diff options
context:
space:
mode:
Diffstat (limited to 'request.c')
-rw-r--r--request.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/request.c b/request.c
index e8dfcf7..32e46f0 100644
--- a/request.c
+++ b/request.c
@@ -160,6 +160,8 @@ void request(void (*handler)(interchange_response *), void (*callback)(void *),
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, append);
interchange_response *response = malloc(sizeof(interchange_response));
+ response->url = malloc(length + 1);
+ strcpy(response->url, url);
response->data = malloc(1);
response->numBytes = 0;
response->userData = callback;