File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ export function parseContentType(contentTypeValue: string | undefined): ContentT
1010 if ( ! contentTypeValue ) {
1111 return undefined ;
1212 }
13- const [ mediaType , ...args ] = contentTypeValue . split ( ";" ) . map ( ( s ) => s . trim ( ) ) ;
13+ const [ mediaType , ...args ] = contentTypeValue . split ( ";" ) . map ( ( s ) => s . trim ( ) . toLowerCase ( ) ) ;
1414 const parameters : Record < string , string > = { } ;
1515
1616 for ( const param of args ) {
17- const [ key , value ] = param . split ( "=" ) . map ( ( s ) => s . trim ( ) ) ;
17+ const [ key , value ] = param . split ( "=" ) . map ( ( s ) => s . trim ( ) . toLowerCase ( ) ) ;
1818 if ( key && value ) {
1919 parameters [ key ] = value ;
2020 }
@@ -26,7 +26,7 @@ export function parseContentType(contentTypeValue: string | undefined): ContentT
2626// Determine whether a content type string is a valid JSON content type.
2727// https://docs.microsoft.com/en-us/azure/azure-app-configuration/howto-leverage-json-content-type
2828export function isJsonContentType ( contentType : ContentType | undefined ) : boolean {
29- const mediaType = contentType ?. mediaType ?. trim ( ) . toLowerCase ( ) ;
29+ const mediaType = contentType ?. mediaType ;
3030 if ( ! mediaType ) {
3131 return false ;
3232 }
You can’t perform that action at this time.
0 commit comments