Skip to content
Browse files

Properly handle unknwon media-types in INFO

Send a 415 Unsupported Media Type response if an INFO message contains an unknown media-type.
  • Loading branch information...
1 parent 62e8323 commit 4353e10b67140be0faf9e5e42a36e216e57d5362 @shimaore committed Feb 19, 2014
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/RTCSession.js
View
2 src/RTCSession.js
@@ -739,6 +739,8 @@ RTCSession.prototype.receiveRequest = function(request) {
contentType = request.getHeader('content-type');
if (contentType && (contentType.match(/^application\/dtmf-relay/i))) {
new DTMF(this).init_incoming(request);
+ } else {
+ request.reply(415,null,{'Accept':'application/dtmf-relay'});
}
}
}

0 comments on commit 4353e10

Please sign in to comment.
Something went wrong with that request. Please try again.