File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -269,8 +269,9 @@ Server.prototype.attachServe = function(srv){
269
269
*/
270
270
271
271
Server . prototype . serve = function ( req , res ) {
272
- if ( req . headers . etag ) {
273
- if ( clientVersion == req . headers . etag ) {
272
+ var etag = req . headers [ 'if-none-match' ] ;
273
+ if ( etag ) {
274
+ if ( clientVersion == etag ) {
274
275
debug ( 'serve client 304' ) ;
275
276
res . writeHead ( 304 ) ;
276
277
res . end ( ) ;
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ describe('socket.io', function(){
161
161
io ( srv ) ;
162
162
request ( srv )
163
163
. get ( '/socket.io/socket.io.js' )
164
- . set ( 'ETag ' , clientVersion )
164
+ . set ( 'If-None-Match ' , clientVersion )
165
165
. end ( function ( err , res ) {
166
166
if ( err ) return done ( err ) ;
167
167
expect ( res . statusCode ) . to . be ( 304 ) ;
You can’t perform that action at this time.
0 commit comments