On 7 June 2010 08:16, Ronald S. Bultje <rsbultje@gmail.com> wrote:
Hi,
#1:
On Sun, Jun 6, 2010 at 10:10 PM, Josh Allmann <joshua.allmann@gmail.com> wrote:
+ if (ret != 0) { + return ret; + }
Superfluous {}.
Removed.
+ /* A size of zero can be used to force + * initializaton of the connection. */ + if (!size) + return 0;
Eh... I'm not sure I like that.
Left as per IRC discussion.
#2:
+static inline int has_header(const char *str, const char *header) +{ + return av_stristart(str, header+2, &str) || av_stristr(str, header); +}
av_stristart(a, b, NULL) should work also. Why header+2 (I know it's because of \r\n, but please document that because we'll forget...)?
#5:
av_strlcat(buf, str, sizeof(buf)); av_free(str); } + if (send_content_length > 0 && send_content) av_strlcatf(buf, sizeof(buf), "Content-Length: %d\r\n", send_content_length);
Cosmetic.
Removed.
The rest looks nice, I hope we can apply in the next round.
*dances* Luca, Martin, any more comments? Josh