You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It says, priority.o - spec.o. So, getCharsetPriority() will set the o value of "SeCoNd" to 2, the index of "second", instead of 0, the index of "SECOND".
If we change that line to spec.o - priority.o, the o value of "SeCoNd" becomes 0, and will come before "first".
But, of course, realistically, who's going to send such a header where there are duplicate charsets, and they're not consecutive, with lower-priority available charsets requested in between?
You shouldn't have to do anything about the second question. I just like reading random pieces of code and poking at them :x
The text was updated successfully, but these errors were encountered:
I feel like passing
undefined
and passing an empty array should mean the same thing. But, I'm not sure how charset negotiation works.negotiator/lib/charset.js
Line 126 in 89ab003
This other question is more contrived,
I'm looking at this line, in particular,
negotiator/lib/charset.js
Line 88 in 89ab003
It says,
priority.o - spec.o
. So,getCharsetPriority()
will set theo
value of"SeCoNd"
to2
, the index of"second"
, instead of0
, the index of"SECOND"
.If we change that line to
spec.o - priority.o
, theo
value of"SeCoNd"
becomes0
, and will come before"first"
.But, of course, realistically, who's going to send such a header where there are duplicate charsets, and they're not consecutive, with lower-priority available charsets requested in between?
You shouldn't have to do anything about the second question. I just like reading random pieces of code and poking at them :x
The text was updated successfully, but these errors were encountered: