Skip to content

Replace System.Web with System.Net.WebUtility in data migration#384

Merged
imnasnainaec merged 1 commit into
masterfrom
replace-system-web-with-webutility
Jul 2, 2026
Merged

Replace System.Web with System.Net.WebUtility in data migration#384
imnasnainaec merged 1 commit into
masterfrom
replace-system-web-with-webutility

Conversation

@hahn-kev

@hahn-kev hahn-kev commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

This allows us to remove our dependency on System.Web.HttpUtility which is designed for use on the server per https://learn.microsoft.com/en-us/dotnet/api/system.web.httputility?view=net-10.0#remarks

for DataMigration7000040Tests.cs I removed the unused copy-pasted helpers that still referenced System.Web and were never called by the test.


This change is Reviewable

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

LCM Tests

    16 files  ±0      16 suites  ±0   3m 4s ⏱️ +2s
 2 863 tests ±0   2 843 ✅ ±0   20 💤 ±0  0 ❌ ±0 
11 400 runs  ±0  11 232 ✅ ±0  168 💤 ±0  0 ❌ ±0 

Results for commit 02d34b1. ± Comparison against base commit 840564b.

@imnasnainaec imnasnainaec left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@imnasnainaec reviewed 5 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on hahn-kev).


a discussion (no related file):
One observation by Devin:

src/SIL.LCModel/DomainServices/DataMigration/DataMigration7000037.cs:133

URL encoding output will have different hex casing in migrated data

The switch from HttpUtility.UrlEncode to WebUtility.UrlEncode (DataMigration7000037.cs:133) produces uppercase hex digits (%3D, %3A, %26) instead of lowercase (%3d, %3a, %26). For example, app=flex&tool=interlinearEdit would previously encode as app%3dflex%26tool%3dinterlinearEdit but now encodes as app%3Dflex%26tool%3DinterlinearEdit. Both are valid per RFC 3986 and decode identically, but any database that still needs this migration applied will get cosmetically different stored data than it would have under the old code. Since this is a one-time migration (version 7000036→7000037) and most databases have long since been migrated, the practical impact is negligible.

@imnasnainaec imnasnainaec merged commit 66e04e3 into master Jul 2, 2026
5 checks passed
@imnasnainaec imnasnainaec deleted the replace-system-web-with-webutility branch July 2, 2026 17:04
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.

2 participants