From fe237200e4b3921e190d13693402e14d63fe2fa4 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Fri, 26 May 2006 20:35:16 +0200 Subject: Always use GET-requests on redirects. --- protocols/http_client.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'protocols/http_client.c') diff --git a/protocols/http_client.c b/protocols/http_client.c index 88aadff3..c793d9d4 100644 --- a/protocols/http_client.c +++ b/protocols/http_client.c @@ -374,19 +374,7 @@ got_reply: /* So, now I just allocated enough memory, so I'm going to use strcat(), whether you like it or not. :-) */ - /* First, find the GET/POST/whatever from the original request. */ - s = strchr( req->request, ' ' ); - if( s == NULL ) - { - req->status_string = g_strdup( "Error while rebuilding request string" ); - g_free( new_request ); - g_free( url ); - goto cleanup; - } - - *s = 0; - sprintf( new_request, "%s %s HTTP/1.0\r\n", req->request, url->file ); - *s = ' '; + sprintf( new_request, "GET %s HTTP/1.0", url->file ); s = strstr( req->request, "\r\n" ); if( s == NULL ) @@ -397,7 +385,7 @@ got_reply: goto cleanup; } - strcat( new_request, s + 2 ); + strcat( new_request, s ); new_host = g_strdup( url->host ); new_port = url->port; new_proto = url->proto; -- cgit v1.2.3