http: optionally extract charset parameter from content-type
commite31316263af98c4583be39b469f3152a23eba91d
authorJeff King <peff@peff.net>
Thu, 22 May 2014 09:30:05 +0000 (22 05:30 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 27 May 2014 16:59:19 +0000 (27 09:59 -0700)
tree2bab83853f1a2dbb953689da98fe6cd218b72fb8
parentbf197fd7eebcb3579dd659af35822ce88adc66c8
http: optionally extract charset parameter from content-type

Since the previous commit, we now give a sanitized,
shortened version of the content-type header to any callers
who ask for it.

This patch adds back a way for them to cleanly access
specific parameters to the type. We could easily extract all
parameters and make them available via a string_list, but:

  1. That complicates the interface and memory management.

  2. In practice, no planned callers care about anything
     except the charset.

This patch therefore goes with the simplest thing, and we
can expand or change the interface later if it becomes
necessary.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http.c
http.h