mirror of https://github.com/ipxe/ipxe.git
Don't pass through zero-length requests
parent
0050378f51
commit
2c67167929
|
@ -156,6 +156,10 @@ void stream_acked ( struct stream_connection *conn, size_t len ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Ignore zero-length blocks */
|
||||||
|
if ( len == 0 )
|
||||||
|
return;
|
||||||
|
|
||||||
/* Hand off to application */
|
/* Hand off to application */
|
||||||
if ( app->op->acked )
|
if ( app->op->acked )
|
||||||
app->op->acked ( app, len );
|
app->op->acked ( app, len );
|
||||||
|
@ -181,6 +185,10 @@ void stream_newdata ( struct stream_connection *conn,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Ignore zero-length blocks */
|
||||||
|
if ( len == 0 )
|
||||||
|
return;
|
||||||
|
|
||||||
/* Hand off to application */
|
/* Hand off to application */
|
||||||
if ( app->op->newdata )
|
if ( app->op->newdata )
|
||||||
app->op->newdata ( app, data, len );
|
app->op->newdata ( app, data, len );
|
||||||
|
@ -297,6 +305,10 @@ int stream_send ( struct stream_application *app,
|
||||||
return -ENOTCONN;
|
return -ENOTCONN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Ignore zero-length blocks */
|
||||||
|
if ( len == 0 )
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* Hand off to connection */
|
/* Hand off to connection */
|
||||||
if ( ! conn->op->send )
|
if ( ! conn->op->send )
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
|
|
Loading…
Reference in New Issue