www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11879] New: missing default User-Agent in std.net.curl

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11879

           Summary: missing default User-Agent in std.net.curl
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: code dawg.eu


--- Comment #0 from Martin Nowak <code dawg.eu> 2014-01-07 16:14:44 PST ---
The W3C standard says "User agents SHOULD include this field with requests."
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43

Some APIs will reject requests without a User-Agent.
Most notably https://api.github.com will return a 403 and the following
message.

Request forbidden by administrative rules. Please make sure your request has a
User-Agent header (http://developer.github.com/v3/#user-agent-required). Check
https://developer.github.com for other possible causes.

I think we should chose a default value for this field like most other
libraries.
http://www.useragentstring.com/pages/Librarielist/

How about "Phobos-std.net.curl/2.064 (libcurl/7.32.0)"?

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 07 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11879



--- Comment #1 from Martin Nowak <code dawg.eu> 2014-01-07 16:15:34 PST ---
I forgot to mention, the problem is very hard to debug, especially over an
encrypted connection.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 07 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11879


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com
            Version|unspecified                 |D2


--- Comment #2 from Walter Bright <bugzilla digitalmars.com> 2014-01-13
02:27:41 PST ---
https://github.com/D-Programming-Language/phobos/pull/1847

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 13 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11879



--- Comment #3 from github-bugzilla puremagic.com 2014-01-13 02:28:34 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/b84b43ff5de7577c05578eccd6c4bd12352fff0c
fix Issue 11879 - missing default User-Agent in std.net.curl

- use "Phobos-std.net.curl/2.065 (libcurl/7.32.0)" as
  default "User-Agent"

- add method to set a different user agent

https://github.com/D-Programming-Language/phobos/commit/9cb7cabc5954b5dc7443d85bc69692564ec3d771
Merge pull request #1847 from MartinNowak/fix11879

fix Issue 11879 - missing default User-Agent in std.net.curl

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 13 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11879


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 13 2014