Bug 1765290 Comment 2 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

It seems to me like the way forward is to change the encoding from utf16 to utf8 in the LinkHeader and all functions working with LinkHeader attributes (s/nsString/nsCString):

https://searchfox.org/mozilla-central/rev/3840d8109501fbebdf22212165ea15a391280dcb/netwerk/base/nsNetUtil.h#1005-1018
```cpp
struct LinkHeader {
  nsString mHref;
  nsString mRel;
  nsString mTitle;
  nsString mIntegrity;
  nsString mSrcset;
  nsString mSizes;
  nsString mType;
  nsString mMedia;
  nsString mAnchor;
  nsString mCrossOrigin;
  nsString mReferrerPolicy;
  nsString mAs;
}
```
It seems to me like the way forward is to change the encoding from utf16 to utf8 in the LinkHeader and all functions working with LinkHeader attributes (s/nsString/nsCString):

https://searchfox.org/mozilla-central/rev/3840d8109501fbebdf22212165ea15a391280dcb/netwerk/base/nsNetUtil.h#1005-1017,1025
```cpp
struct LinkHeader {
  nsString mHref;
  nsString mRel;
  nsString mTitle;
  nsString mIntegrity;
  nsString mSrcset;
  nsString mSizes;
  nsString mType;
  nsString mMedia;
  nsString mAnchor;
  nsString mCrossOrigin;
  nsString mReferrerPolicy;
  nsString mAs;
...
};
```

Back to Bug 1765290 Comment 2