Skip to content

Commit

Permalink
feat(protocol-http): use lowercase keys in Fields class (#4450)
Browse files Browse the repository at this point in the history
  • Loading branch information
milesziemer authored Feb 28, 2023
1 parent 1cbf7a2 commit e0db41d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/protocol-http/src/Fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class Fields {
* @param field The {@link Field} to set.
*/
public setField(field: Field): void {
this.entries[field.name] = field;
this.entries[field.name.toLowerCase()] = field;
}

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

/**
Expand All @@ -42,7 +42,7 @@ export class Fields {
* @param name Name of the entry to delete.
*/
public removeField(name: string): void {
delete this.entries[name];
delete this.entries[name.toLowerCase()];
}

/**
Expand Down

0 comments on commit e0db41d

Please sign in to comment.