Slightly incorrect User-Agent string with libcurl requests

Description

In r773, a custom User-Agent string was added for curl requests (https://shibboleth.atlassian.net/browse/SSPCPP-297#icft=SSPCPP-297).

There's a slight violation of the spec for this header - currently the code produces strings such as

shibboleth/2.5.3 OpenSAML/2.5.3 XMLTooling/1.5.3 XML-Security-C/1.7.2 Xerces-C/3.1.1 log4shib/1.0.8 libcurl/7.30.0 OpenSSL 1.0.0-fips 29 Mar 2010

where the OpenSSL part does not really comply with the syntax from RFC 2616:

User-Agent = "User-Agent" ":" 1*( product | comment ) product = token ["/" product-version] product-version = token

or RFC 7231, respectively:

User-Agent = product *( RWS ( product / comment ) ) product = token ["/" product-version] product-version = token

In both cases, product must not include whitespace (and if comment is included, it must appear within parentheses).

The easiest way to fix this would be to compose the last part with "OpenSSL/" plus the second word from the OPENSSL_VERSION_TEXT constant (i.e., OpenSSL/1.0.0-fips in the above case).

Environment

None

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Created September 16, 2014 at 2:55 PM
Updated March 20, 2015 at 12:33 AM
Resolved January 9, 2015 at 4:32 AM

Flag notifications