Comparing version 0.5.2 to 0.5.3
@@ -158,3 +158,3 @@ const bl = require('bl') | ||
if (req.url.observe) { | ||
if (req.url.observe && packet.code !== '4.04') { | ||
response = new ObserveStream(packet, rsinfo) | ||
@@ -161,0 +161,0 @@ response.on('close', function() { |
{ | ||
"name": "coap", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "A CoAP library for node modelled after 'http'", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -73,2 +73,20 @@ | ||
it('should support a 4.04 observe request and emit an end event in the response', function(done) { | ||
var req = coap.request({ | ||
port: port | ||
, observe: true | ||
}).end() | ||
req.on('response', function(res) { | ||
expect(res.code).to.eql('4.04') | ||
res.on('end', done) | ||
res.resume() | ||
}) | ||
server.on('request', function(req, res) { | ||
res.statusCode = '4.04' | ||
res.end() | ||
}) | ||
}) | ||
describe('formats', function() { | ||
@@ -75,0 +93,0 @@ var formats = [ 'text/plain', 'application/link-format', |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103644
2778