Skip to content

Commit

Permalink
Merge 76bcc30 into ab6b368
Browse files Browse the repository at this point in the history
  • Loading branch information
berndsi committed Jan 17, 2019
2 parents ab6b368 + 76bcc30 commit 13e1027
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ensure_content_type.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const cType = require('content-type');
const P = require('bluebird');
const mwUtil = require('./mwUtil');
const semver = require('semver');

// Utility function to split path & version suffix from a profile parameter.
function splitProfile(profile) {
Expand Down Expand Up @@ -51,7 +52,7 @@ function checkContentType(hyper, req, next, expectedContentType, responsePromise
const actualProfileParts = splitProfile(actualProfile);
const expectedProfileParts = splitProfile(expectedProfile);
if (actualProfileParts.path === expectedProfileParts.path
&& actualProfileParts.version > expectedProfileParts.version) {
&& semver.gt(actualProfileParts.version, expectedProfileParts.version)) {
return res;
}
}
Expand Down

0 comments on commit 13e1027

Please sign in to comment.