Skip to content

Commit e0db41d

Browse files
authored
feat(protocol-http): use lowercase keys in Fields class (#4450)
1 parent 1cbf7a2 commit e0db41d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/protocol-http/src/Fields.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class Fields {
2222
* @param field The {@link Field} to set.
2323
*/
2424
public setField(field: Field): void {
25-
this.entries[field.name] = field;
25+
this.entries[field.name.toLowerCase()] = field;
2626
}
2727

2828
/**
@@ -33,7 +33,7 @@ export class Fields {
3333
* @returns The {@link Field} if it exists.
3434
*/
3535
public getField(name: string): Field | undefined {
36-
return this.entries[name];
36+
return this.entries[name.toLowerCase()];
3737
}
3838

3939
/**
@@ -42,7 +42,7 @@ export class Fields {
4242
* @param name Name of the entry to delete.
4343
*/
4444
public removeField(name: string): void {
45-
delete this.entries[name];
45+
delete this.entries[name.toLowerCase()];
4646
}
4747

4848
/**

0 commit comments

Comments
 (0)