File: send-user-agent

package info (click to toggle)
haskell-github 0.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 452 kB
  • sloc: haskell: 2,286; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 689 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: send user-agent
   Backport fix to send User-Agent, which is now required by the github API.
   Closes: #706187
Author: Joey Hess <joeyh@debian.org>
Bug-Debian: http://bugs.debian.org/706187

--- haskell-github-0.4.0.orig/Github/Private.hs
+++ haskell-github-0.4.0/Github/Private.hs
@@ -71,6 +71,7 @@ doHttps method url auth body = do
                     , secure = True
                     , port = 443
                     , requestBody = requestBody
+                    , requestHeaders = [("User-Agent", "github.hs/0.4.0")]
                     , checkStatus = successOrMissing
                     }
       authRequest = maybe id (uncurry applyBasicAuth) auth request