Created attachment 272459 [details] [diff] [review] Fix I think we should fix this on branches too, since security code depends on origins, which are hostPort. Seem reasonable?
Created attachment 272460 [details] [diff] [review] Slightly better This handles SetPort() to mDefaultPort more correctly, imo.
Comment on attachment 272460 [details] [diff] [review] Slightly better + mAuthority.mLen += start - mPath.mPos; I think it would be clearer if you wrote this as: mAuthority.mLen -= mPath.mPos - start; perhaps store that length in a temp. var even and pass that to Cut and -=
Created attachment 272596 [details] [diff] [review] Updated to comments I made that code read: // need to remove the port number from the URL spec PRUint32 start = mHost.mPos + mHost.mLen; PRUint32 lengthToCut = mPath.mPos - start; mSpec.Cut(start, lengthToCut); mAuthority.mLen -= lengthToCut; ShiftFromPath(-lengthToCut); I think we should take this on branch; right now if a principal's URI gets SetPort called on it somewhere along the way, the principals origin will actually be wrong.
sounds good to me.
Comment on attachment 272596 [details] [diff] [review] Updated to comments approved for 22.214.171.124, a=dveditz for release-drivers
Fixed on branch.