[axel-devel] HI all, I do some modifications in conn.c, which make axel support redirection better.

Fluke fluke.l at gmail.com
Fri Jul 4 09:04:25 UTC 2008


Hi all,
     I do some modifications in conn.c, which make axel support
redirection better.
     In the original version, axel cannot handle full url and relative
path well. So I do something.

     I don't know if I could have the svn commit permission. So I
attach my conn.c with this mail.

    I only add a conn_url_base() function, and change the 3xx handle
code, like this:

if( strstr( s, "://" ) != NULL)
			{
				sprintf( conn->http->headers, "%s", s );
				strncpy( s, conn->http->headers, MAX_STRING );
			}
			else if( s[0] == '/' )
			{
				sprintf( conn->http->headers, "http://%s:%i%s",
					conn->host, conn->port, s );
				strncpy( s, conn->http->headers, MAX_STRING );
			}
			else
			{
				sprintf( conn->http->headers, "%s%s",
					conn_url_base( conn ), s );
				strncpy( s, conn->http->headers, MAX_STRING );
			}



-- 
Yours,
  fluke
fluke.l at gmail.com
http://algo-field.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: conn.c
Type: application/octet-stream
Size: 9046 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/axel-devel/attachments/20080704/3d4a110b/attachment.obj 


More information about the axel-devel mailing list