This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. 02 May, 2016 1 commit
    • Edsko de Vries's avatar
      Don't ignore 206 response in plain-http transport · da403dff
      Edsko de Vries authored
      The plainHttpTransport implementation saved the resulting file only when the
      server responded with 200 OK, thus ignoring the payload from the server when
      the server responded with a 206 Partial Content. This was causing incremental
      updates through hackage-security to fail (it wouldn't fail fatally;
      hackage-security would notice the invalid timestamp and download the whole
      thing instead, but of course this means we're not actually getting any
      incremental behaviour).
      da403dff
  2. 06 Jan, 2016 1 commit
  3. 05 Nov, 2015 1 commit
  4. 04 Nov, 2015 3 commits
    • Benno Fünfstück's avatar
      HttpUtils: fix warnings · 2a07a9e9
      Benno Fünfstück authored
      2a07a9e9
    • Benno Fünfstück's avatar
      HttpUtils: pass powershell script via stdin · 34b4820e
      Benno Fünfstück authored
      The powershell script contains the password, so writing it to a file
      is a bit unsafe. We know pass it via stdin.
      This commit also improves the error message for network failures a
      little bit.
      34b4820e
    • Benno Fünfstück's avatar
      HttpUtils: don't pass passwords as plain arguments · e75fbc9d
      Benno Fünfstück authored
      Passing passwords via command line arguments is insecure: anyone who
      is able to read the process list on the system can read the passwords
      as well.
      
      For curl, we pass the password via stdin by using the --config option,
      which allows us to pass arbitrary additional options via stdin.
      
      Unfortunately, wget's --config option does not support - for stdin. So
      we instead use the --input-file option to pass an URI with the password
      via stdin.
      e75fbc9d
  5. 27 Oct, 2015 3 commits
    • Benno Fünfstück's avatar
      HTTPUtils: curl: correct handling of text response · 9591d954
      Benno Fünfstück authored
      This fixes an issue in the curl transport when a text response is returned
      that doesn't end with a newline from a POST or PUT request. The code expects
      the HTTP status code to be on a new line, but that is not the case if the response
      doesn't have a trailing new line. We fix this by always printing a new line before
      printing the status code. To avoid duplicate new lines, we now strip trailing empty
      lines at the end of the response.
      9591d954
    • Benno Fünfstück's avatar
      HttpUtils: fixes for powershell transport · 5ebc1589
      Benno Fünfstück authored
      This commit refactors the powershell transport to avoid duplication and
      also fixes a few problems with it:
      
      * We now run powershell with the ExecutionPolicy bypass, is required when
        the default security policy disallows executing unsigned scripts
        (like our script)
      * The powershell script itself has been refactored to behave more like
        curl. In particular, it now prints HTTP status code errors in a nicer
        way instead of failing with a PowerShell Exception + backtrack. We also
        now only print the exception message when we get any other exception,
        since the user is likely not familar with the powershell script at all
        and the other information is thus only confusing and not helpful at all.
      * We now handle the case where the server returns some message after a
        POST or a PUT correctly. Previously, that resulted in the raw bytes
        being written to stdout before the HTTP status code, which confused the
        simplistic parser. We now always write the HTTP status code first and
        decode the bytes as UTF8 before sending them to stdout as well.
      5ebc1589
    • Benno Fünfstück's avatar
      96398f57
  6. 26 Oct, 2015 1 commit
  7. 29 Jun, 2015 4 commits
    • Duncan Coutts's avatar
      Fix warning on 7.10 · 57b6c494
      Duncan Coutts authored
      57b6c494
    • Duncan Coutts's avatar
      Change the logic for automatically upgrading to HTTPS · 36e9e622
      Duncan Coutts authored
      The initial patch would always try to use HTTPS, even when the repo
      specified to use HTTP. This works for the central community hackage
      but obviously does not work in general.
      
      The new logic is that we always follow what is specified for the
      remote repo in the config, except for built-in known repos (currently
      just the central community hackage) where we mark them as also
      supporting https. For upload when uploading to such a marked repo
      then we will try https and will complain if the plain-http impl was
      selected automatically (but it's ok if selected manually).
      
      This patch also changes things so that for http urls on download, we
      stick to the builtin http impl by default, and only use the external
      ones if https support is required (i.e. because the repo was
      configured to use an https url)
      36e9e622
    • Duncan Coutts's avatar
      Further work, refactoring and reformatting of new http transport code · 22f05445
      Duncan Coutts authored
      Move utils into other Util modules.
      Reformat all code to 80 cols.
      Reorder code and add more comments.
      Use long form style program args, e.g. --silent rather than -s
      Finish implementation of form upload with wget
      Fix reporting of server error messages for upload (curl & builtin)
      Implement collecting of ETags for curl and wget.
      Fix wget for case of 304 not modified response (wget uses exit code 8).
      Rework transport configuration phase.
      22f05445
    • U-CIQDEV\gbazerman's avatar
      Implement HTTPS support using external curl, wget and powershell · b780cc77
      U-CIQDEV\gbazerman authored and Duncan Coutts's avatar Duncan Coutts committed
      Supports both uploading and downloading.
      Basic built-in HTTP is still supported.
      b780cc77
  8. 28 Apr, 2015 3 commits
  9. 27 Jul, 2014 1 commit
  10. 25 Jul, 2014 1 commit
  11. 02 May, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Add OS and arch to HTTP user-agent string · d0527418
      Herbert Valerio Riedel authored and tibbe's avatar tibbe committed
      This makes the HTTP user-agent field look like so:
      
          User-Agent: cabal-install/1.21.0.0 (linux; x86_64)
      
      This allows us to gather more statistics about our user-base as
      with the current user-agent string we can only do a rough break-down by
      cabal-install version numbers.
      
      (cherry picked from commit bd0fcd55)
      d0527418
  12. 01 May, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Add OS and arch to HTTP user-agent string · bd0fcd55
      Herbert Valerio Riedel authored
      This makes the HTTP user-agent field look like so:
      
          User-Agent: cabal-install/1.21.0.0 (linux; x86_64)
      
      This allows us to gather more statistics about our user-base as
      with the current user-agent string we can only do a rough break-down by
      cabal-install version numbers.
      bd0fcd55
  13. 14 Apr, 2014 1 commit
  14. 29 May, 2013 2 commits
  15. 24 May, 2013 1 commit
  16. 22 May, 2013 7 commits
  17. 20 May, 2013 1 commit
  18. 04 Jan, 2013 1 commit
  19. 03 Nov, 2012 1 commit
  20. 26 Aug, 2012 2 commits
  21. 11 Aug, 2012 1 commit
  22. 28 Sep, 2011 1 commit
  23. 22 Dec, 2009 1 commit