Skip to content

Comments

Fix user agent string to be RFC 7231 compliant#5

Merged
MarketDataDev01 merged 1 commit intomainfrom
fix/user-agent-rfc7231-compliance
Jan 22, 2026
Merged

Fix user agent string to be RFC 7231 compliant#5
MarketDataDev01 merged 1 commit intomainfrom
fix/user-agent-rfc7231-compliance

Conversation

@MarketDataApp
Copy link
Owner

Changes

Changed user agent format from marketdata-sdk-py-{version} to marketdata-sdk-py/{version} to comply with RFC 7231 specification which requires product/version format.

Changes Made

  • Updated _get_user_agent() method in client.py
  • Updated corresponding tests in test_client.py
  • Updated README.md documentation

Testing

All tests pass (23/23 client tests passed).

RFC 7231 Compliance

Per RFC 7231 Section 5.5.3, the User-Agent header must follow the format:

product = token [ "/" product-version ]

The previous format used a hyphen separator which is not compliant. The new format uses a forward slash as required by the specification.

Changed user agent format from 'marketdata-sdk-py-{version}' to
'marketdata-sdk-py/{version}' to comply with RFC 7231 specification
which requires product/version format.

- Updated _get_user_agent() method in client.py
- Updated corresponding tests in test_client.py
- Updated README.md documentation
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (21a684d) to head (8b060ff).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##              main        #5   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           51        51           
  Lines         2113      2113           
=========================================
  Hits          2113      2113           
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MarketDataDev01 MarketDataDev01 merged commit ded9c45 into main Jan 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants