From: Martin Mares <mj@ucw.cz>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Get commits from remote repositories by HTTP
Date: Sun, 17 Apr 2005 00:17:45 +0200 [thread overview]
Message-ID: <20050416221745.GA10280@ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.21.0504161750020.30848-100000@iabervon.org>
Hello!
> This adds a program to download a commit, the trees, and the blobs in them
> from a remote repository using HTTP. It skips anything you already have.
Is it really necessary to write your own HTTP downloader? If so, is it
necessary to forget basic stuff like the "Host:" header? ;-)
If you feel that it should be optimized for speed, then at least use
persistent connections.
> + if (memcmp(target, "http://", 7))
> + return -1;
Can crash if the string is too short.
> + entry = gethostbyname(name);
> + memcpy(&sockad.sin_addr.s_addr,
> + &((struct in_addr *)entry->h_addr)->s_addr, 4);
Can crash if the host doesn't exist or if you feed it with an URL containing
port number.
> +static int get_connection()
(void)
> + local = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0666);
What if it fails?
Have a nice fortnight
--
Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
A student who changes the course of history is probably taking an exam.
next prev parent reply other threads:[~2005-04-16 22:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-16 22:03 [PATCH] Get commits from remote repositories by HTTP Daniel Barkalow
2005-04-16 22:17 ` Martin Mares [this message]
2005-04-16 22:43 ` Daniel Barkalow
2005-04-16 22:24 ` Tony Luck
2005-04-16 22:33 ` Daniel Barkalow
2005-04-16 22:42 ` Adam Kropelin
2005-04-16 22:45 ` Daniel Barkalow
2005-04-16 22:52 ` Adam Kropelin
2005-04-17 3:16 ` tony.luck
2005-04-18 18:41 ` tony.luck
2005-04-18 18:47 ` Petr Baudis
2005-04-18 20:48 ` tony.luck
2005-04-16 22:32 ` Jan-Benedict Glaw
2005-04-16 22:37 ` Daniel Barkalow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050416221745.GA10280@ucw.cz \
--to=mj@ucw.cz \
--cc=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.