Skip to content

Conversation

@tdstein
Copy link
Collaborator

@tdstein tdstein commented Dec 4, 2025

Intent

Some WAFs strictly expect User-Agent strings that use PascalCase, causing the previous User-Agent string (rsconnect-python) to be rejected.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change

Approach

Automated Tests

Directions for Reviewers

Checklist

  • I have updated CHANGELOG.md to cover notable changes.
  • I have updated all related GitHub issues to reflect their current state.
  • I have run the rsconnect-python-tests-at-night workflow in Connect against this feature branch.

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

PR Preview Action v1.6.3
Preview removed because the pull request was closed.
2025-12-05 14:26 UTC

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
5188 3954 76% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
rsconnect/http_support.py 80% 🟢
TOTAL 80% 🟢

updated for commit: 58f8c30 by action🐍

@tdstein
Copy link
Collaborator Author

tdstein commented Dec 4, 2025

@tdstein tdstein requested a review from Copilot December 4, 2025 21:28
Copilot finished reviewing on behalf of tdstein December 4, 2025 21:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where Web Application Firewalls (WAFs) that strictly expect PascalCase User-Agent strings were rejecting requests from rsconnect-python. The User-Agent string is changed from rsconnect-python/x.y.z to RSConnectPython/x.y.z to ensure compatibility with such WAFs.

Key changes:

  • Updated the User-Agent string format from kebab-case to PascalCase
  • Updated CHANGELOG to document the fix

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
rsconnect/http_support.py Changed the _user_agent variable value from "rsconnect-python/%s" to "RSConnectPython/%s"
docs/CHANGELOG.md Added entry documenting the User-Agent string format fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tdstein tdstein requested a review from a team December 4, 2025 21:31
Copy link
Collaborator

@aronatkins aronatkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do any of our other clients have a similar mistake? Should we use this opportunity to use "Posit"?

@karawoo
Copy link
Contributor

karawoo commented Dec 4, 2025

Do any of our other clients have a similar mistake?

I see rsconnect uses rsconnect/x.y.z: https://github.com/rstudio/rsconnect/blob/b234450f2995cffe89bb37a91203fe8a2a21ba4a/R/http.R#L644. Happy to update it.

Should we use this opportunity to use "Posit"?

I think sticking with the name of the package itself makes more sense, personally

@tdstein
Copy link
Collaborator Author

tdstein commented Dec 4, 2025

Do any of our other clients have a similar mistake?

I see rsconnect uses rsconnect/x.y.z: https://github.com/rstudio/rsconnect/blob/b234450f2995cffe89bb37a91203fe8a2a21ba4a/R/http.R#L644. Happy to update it.

Should we use this opportunity to use "Posit"?

I think sticking with the name of the package itself makes more sense, personally

Had the same thought. Better to rename everything all at once instead of piecemeal in my opinion.

@aronatkins
Copy link
Collaborator

Had the same thought. Better to rename everything all at once instead of piecemeal in my opinion.

Fine by me. RSConnect forever!

@tdstein tdstein merged commit d8809b4 into main Dec 5, 2025
19 checks passed
@tdstein tdstein deleted the tdstein/change-user-agent-string branch December 5, 2025 14:26
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.

4 participants