66
77#include < LibJS/Runtime/Completion.h>
88#include < LibJS/Runtime/VM.h>
9+ #include < LibTextCodec/Decoder.h>
910#include < LibWeb/Bindings/HeadersPrototype.h>
1011#include < LibWeb/Bindings/Intrinsics.h>
1112#include < LibWeb/Fetch/Headers.h>
12- #include < LibWeb/Infra/Strings.h>
1313
1414namespace Web ::Fetch {
1515
@@ -102,7 +102,7 @@ WebIDL::ExceptionOr<Optional<String>> Headers::get(String const& name)
102102
103103 // 2. Return the result of getting name from this’s header list.
104104 auto byte_buffer = m_header_list->get (name);
105- return byte_buffer.has_value () ? Infra ::isomorphic_decode (*byte_buffer) : Optional<String> {};
105+ return byte_buffer.has_value () ? TextCodec ::isomorphic_decode (*byte_buffer) : Optional<String> {};
106106}
107107
108108// https://fetch.spec.whatwg.org/#dom-headers-getsetcookie
@@ -119,7 +119,7 @@ Vector<String> Headers::get_set_cookie()
119119 // `Set-Cookie`, in order.
120120 for (auto const & header : *m_header_list) {
121121 if (header.name .equals_ignoring_ascii_case (" Set-Cookie" sv))
122- values.append (Infra ::isomorphic_decode (header.value ));
122+ values.append (TextCodec ::isomorphic_decode (header.value ));
123123 }
124124 return values;
125125}
@@ -187,7 +187,7 @@ JS::ThrowCompletionOr<void> Headers::for_each(ForEachCallback callback)
187187 auto const & pair = pairs[i];
188188
189189 // 2. Invoke idlCallback with « pair’s value, pair’s key, idlObject » and with thisArg as the callback this value.
190- TRY (callback (Infra ::isomorphic_decode (pair.name ), Infra ::isomorphic_decode (pair.value )));
190+ TRY (callback (TextCodec ::isomorphic_decode (pair.name ), TextCodec ::isomorphic_decode (pair.value )));
191191
192192 // 3. Set pairs to idlObject’s current list of value pairs to iterate over. (It might have changed.)
193193 pairs = value_pairs_to_iterate_over ();
0 commit comments