Permalink
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 93516ef8228426def028dc18c542783882321bca @shimaore committed Feb 19, 2014
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/RTCSession.js
View
@@ -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);
}
}
}

0 comments on commit 93516ef

Please sign in to comment.