1. 28 5月, 2014 5 次提交
    • J
      http: default text charset to iso-8859-1 · c553fd1c
      Jeff King 提交于
      This is specified by RFC 2616 as the default if no "charset"
      parameter is given.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c553fd1c
    • J
      remote-curl: reencode http error messages · fc1b774c
      Jeff King 提交于
      We currently recognize an error message with a content-type
      "text/plain; charset=utf-16" as text, but we ignore the
      charset parameter entirely. Let's encode it to
      log_output_encoding, which is presumably something the
      user's terminal can handle.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      fc1b774c
    • J
      strbuf: add strbuf_reencode helper · d4241f52
      Jeff King 提交于
      This is a convenience wrapper around `reencode_string_len`
      and `strbuf_attach`.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d4241f52
    • J
      http: optionally extract charset parameter from content-type · e3131626
      Jeff King 提交于
      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: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e3131626
    • J
      http: extract type/subtype portion of content-type · bf197fd7
      Jeff King 提交于
      When we get a content-type from curl, we get the whole
      header line, including any parameters, and without any
      normalization (like downcasing or whitespace) applied.
      If we later try to match it with strcmp() or even
      strcasecmp(), we may get false negatives.
      
      This could cause two visible behaviors:
      
        1. We might fail to recognize a smart-http server by its
           content-type.
      
        2. We might fail to relay text/plain error messages to
           users (especially if they contain a charset parameter).
      
      This patch teaches the http code to extract and normalize
      just the type/subtype portion of the string. This is
      technically passing out less information to the callers, who
      can no longer see the parameters. But none of the current
      callers cares, and a future patch will add back an
      easier-to-use method for accessing those parameters.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      bf197fd7
  2. 24 5月, 2014 3 次提交
  3. 22 5月, 2014 1 次提交
  4. 21 5月, 2014 3 次提交
  5. 20 5月, 2014 12 次提交
  6. 18 5月, 2014 1 次提交
  7. 17 5月, 2014 1 次提交
    • J
      request-pull: resurrect for-linus -> tags/for-linus DWIM · d952cbb1
      Junio C Hamano 提交于
      Older versions of Git before v1.7.10 did not DWIM
      
          $ git pull $URL for-linus
      
      to the tag "tags/for-linus" and the users were required to say
      
          $ git pull $URL tags/for-linus
      
      instead.  Because newer versions of Git works either way,
      request-pull used to show tags/for-linus when asked
      
          $ git request-pull origin/master $URL for-linus
      
      The recent updates broke this and in the output we see "for-linus"
      without the "tags/" prefix.
      
      As v1.7.10 is more than 2 years old, this should matter very little
      in practice, but resurrecting it is very simple.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      d952cbb1
  8. 14 5月, 2014 2 次提交
  9. 13 5月, 2014 1 次提交
  10. 11 5月, 2014 1 次提交
  11. 10 5月, 2014 3 次提交
  12. 09 5月, 2014 7 次提交